From d49cac86c5a58787c723633dd3586ff3222d1cd3 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:48:12 -0500 Subject: [PATCH 1/2] ci: add gcc versions to ci matrix --- .github/workflows/build.yml | 50 ++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index daec929a..7752a373 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,37 +12,75 @@ env: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + include: + - os: ubuntu-22.04 + gcc-version: 11 + experimental: false + deployable: true + - os: ubuntu-22.04 + gcc-version: 12 + experimental: false + deployable: false + - os: ubuntu-24.04 + gcc-version: 12 + experimental: false + deployable: false + - os: ubuntu-24.04 + gcc-version: 13 + experimental: false + deployable: false + - os: ubuntu-24.04 + gcc-version: 14 + experimental: true + deployable: false + - os: macos-14 + gcc-version: 13 + experimental: true + deployable: false + - os: macos-14 + gcc-version: 14 + experimental: true + deployable: false + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} 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 From ffe22ef80e9029ea61eafb4a8641eac7504af9ca Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:27:48 -0500 Subject: [PATCH 2/2] fix: support gcc-14 --- .github/workflows/build.yml | 8 -------- gcc/Makefile | 2 +- gcc_arm/Makefile.in | 2 +- gcc_arm/configure | 2 +- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7752a373..8c99957f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,34 +17,26 @@ jobs: include: - os: ubuntu-22.04 gcc-version: 11 - experimental: false deployable: true - os: ubuntu-22.04 gcc-version: 12 - experimental: false deployable: false - os: ubuntu-24.04 gcc-version: 12 - experimental: false deployable: false - os: ubuntu-24.04 gcc-version: 13 - experimental: false deployable: false - os: ubuntu-24.04 gcc-version: 14 - experimental: true deployable: false - os: macos-14 gcc-version: 13 - experimental: true deployable: false - os: macos-14 gcc-version: 14 - experimental: true deployable: false runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} steps: - name: Checkout diff --git a/gcc/Makefile b/gcc/Makefile index 9756e901..c34b354e 100644 --- a/gcc/Makefile +++ b/gcc/Makefile @@ -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) diff --git a/gcc_arm/Makefile.in b/gcc_arm/Makefile.in index 09a87117..10641b80 100755 --- a/gcc_arm/Makefile.in +++ b/gcc_arm/Makefile.in @@ -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 diff --git a/gcc_arm/configure b/gcc_arm/configure index 05c0782f..0b7738dc 100755 --- a/gcc_arm/configure +++ b/gcc_arm/configure @@ -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