Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create gh actions gcc version matrix and support gcc-14 #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 36 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,67 @@ env:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: ubuntu-22.04
gcc-version: 11
deployable: true
- os: ubuntu-22.04
gcc-version: 12
deployable: false
- os: ubuntu-24.04
gcc-version: 12
deployable: false
- os: ubuntu-24.04
gcc-version: 13
deployable: false
- os: ubuntu-24.04
gcc-version: 14
deployable: false
- os: macos-14
gcc-version: 13
deployable: false
- os: macos-14
gcc-version: 14
deployable: false
runs-on: ${{ matrix.os }}
steps:

- name: Checkout
uses: actions/checkout@main

- name: Install deps
- name: Install deps (Linux)
if: ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04' }}
run: |
sudo apt update
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi

- name: Install deps (Mac)
if: ${{ matrix.os == 'macos-14' }}
run: |
brew install arm-none-eabi-binutils arm-none-eabi-gcc

- name: Compile
run: sh build.sh
run: CC=gcc-${{matrix.gcc-version}} CXX=g++-${{matrix.gcc-version}} sh build.sh

# No point in running the following steps if we are not deploying
# See https://github.com/actions/runner/issues/1395 for why fromJSON() is needed
- name: Install to temp dir
if: fromJSON(env.IS_DEPLOY)
if: ${{ fromJSON(env.IS_DEPLOY) && matrix.deployable }}
shell: bash
run: |
mkdir TEMPDIR
sh install.sh TEMPDIR

- name: Create release archive
if: fromJSON(env.IS_DEPLOY)
if: ${{ fromJSON(env.IS_DEPLOY) && matrix.deployable }}
shell: bash
run: tar -C TEMPDIR/tools/agbcc -czf agbcc.tar.gz bin include lib

- name: Upload archive
uses: actions/upload-artifact@main
if: fromJSON(env.IS_DEPLOY)
if: ${{ fromJSON(env.IS_DEPLOY) && matrix.deployable }}
with:
name: agbcc.tar.gz
path: agbcc.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion gcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ VPATH = $(srcdir)

CC = gcc

BASE_CFLAGS = -g -std=gnu11 -Werror-implicit-function-declaration
BASE_CFLAGS = -g -std=gnu11 -Werror-implicit-function-declaration -Wno-error=incompatible-pointer-types

INCLUDES = -I. -I$(srcdir)

Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ALLOCA_FINISH = true
XCFLAGS =
TCFLAGS =
# CYGNUS LOCAL nowarnings/law
CFLAGS = -g -Werror-implicit-function-declaration
CFLAGS = -g -Werror-implicit-function-declaration -Wno-error=incompatible-pointer-types
BOOT_CFLAGS = -O2 $(CFLAGS)
WARN_CFLAGS =
# END CYGNUS LOCAL
Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/configure
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ cat > conftest.$ac_ext << EOF
#line 1139 "configure"
#include "confdefs.h"

main(){return(0);}
int main(){return(0);}
EOF
if { (eval echo configure:1144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
Expand Down