From e57542c44c3a13b0f6788173372bbc3238519d22 Mon Sep 17 00:00:00 2001 From: ayn2op Date: Sun, 11 Oct 2026 18:35:26 -0400 Subject: [PATCH] ci: install an arm64 C compiler on windows-11-arm and merge the test steps --- .github/workflows/ci.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efceb48..c28499f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,29 +26,24 @@ jobs: with: go-version-file: go.mod + # Voice support requires a C compiler, and the one on this runner targets x64. + - if: ${{ matrix.os == 'windows-11-arm' }} + run: | + C:\msys64\usr\bin\pacman -Sy --noconfirm mingw-w64-clang-aarch64-clang + echo "C:\msys64\clangarm64\bin" >> $env:GITHUB_PATH + echo "CC=clang" >> $env:GITHUB_ENV + - name: Check that docs/config.md is up to date if: ${{ matrix.os == 'ubuntu-latest' }} run: | go generate ./internal/config git diff --exit-code docs/config.md - - name: Test - if: ${{ matrix.os != 'windows-11-arm' }} - run: | - go test -race -v ./... - go test -race -v -tags no_spoof_tls_fingerprint,no_voice ./... # -race is not supported on windows/arm64. - name: Test - if: ${{ matrix.os == 'windows-11-arm' }} run: | - go test -v ./... - go test -v -tags no_spoof_tls_fingerprint,no_voice ./... - - # Without voice, no C compiler is needed. - - name: Build without voice - run: go build -tags no_voice -o ${{ runner.temp }}/discordo . - env: - CGO_ENABLED: 0 + go test ${{ matrix.os != 'windows-11-arm' && '-race' || '' }} -v ./... + go test ${{ matrix.os != 'windows-11-arm' && '-race' || '' }} -v -tags no_spoof_tls_fingerprint,no_voice ./... - name: Build run: go build -trimpath -ldflags=-s .