diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00ba11e5e..ed5e14fa7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true env: - NPROC: 1 + NPROC: 2 MAKEFLAGS: "-j${NPROC}" NIMFLAGS: "--parallelBuild:${NPROC} --colors:off -d:chronicles_colors:none" @@ -63,7 +63,7 @@ jobs: cc: gcc - os: macos-15 cpu: arm64 - cc: clang + cc: gcc - os: windows cpu: amd64 cc: gcc @@ -95,7 +95,7 @@ jobs: uses: actions/checkout@v4 - name: Setup MSYS2 (Windows/gcc) - if: runner.os == 'Windows' && matrix.platform.cc == 'gcc' + if: runner.os == 'Windows' uses: msys2/setup-msys2@v2 with: update: true @@ -121,12 +121,19 @@ jobs: mingw-w64-x86_64-nimble mingw-w64-x86_64-nasm - - name: Use gcc-14 + - name: Use gcc-14 (Linux) if: matrix.platform.os == 'linux-gcc-14' run: | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 sudo update-alternatives --set gcc /usr/bin/gcc-14 + - name: Use Homebrew gcc (macOS) + if: runner.os == 'macOS' + run: | + GCC=$(ls /usr/local/bin/gcc-* /opt/homebrew/bin/gcc-* 2>/dev/null | sort -V | tail -1) + echo "Using GCC: ${GCC}" + sudo ln -sf "${GCC}" /usr/local/bin/gcc + - name: Install Nim (pinned) uses: iffy/install-nim@v5 with: @@ -184,12 +191,7 @@ jobs: find . -name ssl_server_full_ec.o -exec file {} \; - name: Build binaries - run: | - CC_FLAGS="" - if [[ '${{ matrix.platform.cc }}' == 'clang' ]]; then - CC_FLAGS="--cc:clang" - fi - make V=1 QUICK_AND_DIRTY_COMPILER=1 NIM_PARAMS="-d:BORINGSS_USE_ASM=false ${CC_FLAGS}" USE_LIBBACKTRACE=0 all + run: make V=1 QUICK_AND_DIRTY_COMPILER=1 USE_LIBBACKTRACE=0 all build-windows: needs: changes @@ -213,7 +215,7 @@ jobs: cc: gcc - os: macos-15 cpu: arm64 - cc: clang + cc: gcc - os: windows cpu: amd64 cc: gcc @@ -245,7 +247,7 @@ jobs: uses: actions/checkout@v4 - name: Setup MSYS2 (Windows/gcc) - if: runner.os == 'Windows' && matrix.platform.cc == 'gcc' + if: runner.os == 'Windows' uses: msys2/setup-msys2@v2 with: update: true @@ -271,12 +273,19 @@ jobs: mingw-w64-x86_64-nimble mingw-w64-x86_64-nasm - - name: Use gcc-14 + - name: Use gcc-14 (Linux) if: matrix.platform.os == 'linux-gcc-14' run: | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 sudo update-alternatives --set gcc /usr/bin/gcc-14 + - name: Use Homebrew gcc (macOS) + if: runner.os == 'macOS' + run: | + GCC=$(ls /usr/local/bin/gcc-* /opt/homebrew/bin/gcc-* 2>/dev/null | sort -V | tail -1) + echo "Using GCC: ${GCC}" + sudo ln -sf "${GCC}" /usr/local/bin/gcc + - name: Install Nim (pinned) uses: iffy/install-nim@v5 with: @@ -339,10 +348,6 @@ jobs: export NIMFLAGS="--colors:off -d:chronicles_colors:none" fi - if [[ '${{ matrix.platform.cc }}' == 'clang' ]]; then - export NIMFLAGS="${NIMFLAGS} --cc:clang" - fi - export MAKEFLAGS="-j1" export USE_LIBBACKTRACE=0