diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8353767..e0c1db7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,7 +27,7 @@ jobs: - os: windows-latest ghc: '9.8' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies (Ubuntu) if: runner.os == 'Linux' @@ -37,13 +37,9 @@ jobs: - name: Install GHCup uses: haskell/ghcup-setup@v1 - - - name: Install ghc/cabal - run: | - set -eux - ghcup install ghc --set ${{ matrix.ghc }} - ghcup install cabal --set latest - shell: bash + with: + ghc: ${{ matrix.ghc }} + cabal: latest - name: Build run: | @@ -101,6 +97,7 @@ jobs: runs-on: ${{ matrix.os }} env: MACOSX_DEPLOYMENT_TARGET: 10.13 + HOMEBREW_CHANGE_ARCH_TO_ARM: 1 strategy: fail-fast: false matrix: @@ -115,22 +112,25 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install GHCup - uses: haskell/ghcup-setup@v1 + - name: Install prerequisites + run: | + bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake + echo PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" >> "$GITHUB_ENV" + echo CC="$HOME/.brew/opt/llvm@13/bin/clang" >> "$GITHUB_ENV" + echo CXX="$HOME/.brew/opt/llvm@13/bin/clang++" >> "$GITHUB_ENV" + echo LD=ld >> "$GITHUB_ENV" + echo AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" >> "$GITHUB_ENV" + echo RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" >> "$GITHUB_ENV" + + - uses: haskell/ghcup-setup@v1 + with: + ghc: ${{ matrix.ghc }} + cabal: latest - name: Run build run: | - bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake - export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" - export CC="$HOME/.brew/opt/llvm@13/bin/clang" - export CXX="$HOME/.brew/opt/llvm@13/bin/clang++" - export LD=ld - export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" - export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" cabal update cabal test - env: - HOMEBREW_CHANGE_ARCH_TO_ARM: 1 freebsd: runs-on: ${{ matrix.os }} @@ -152,6 +152,9 @@ jobs: - name: Install GHCup uses: haskell/ghcup-setup@v1 + with: + ghc: ${{ matrix.ghc }} + cabal: latest - name: Run build run: |