From 553fd6301d5e96755bfab66e24fad01dc1b5fbe5 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Wed, 3 Apr 2024 12:51:50 +0200 Subject: [PATCH 1/3] Remove unused `cabal.project.local` files --- .github/workflows/cabal.project.local.ci.Darwin | 5 ----- .github/workflows/cabal.project.local.ci.Linux | 5 ----- .../workflows/cabal.project.local.ci.MINGW64_NT-10.0-20348 | 5 ----- 3 files changed, 15 deletions(-) delete mode 100644 .github/workflows/cabal.project.local.ci.Darwin delete mode 100644 .github/workflows/cabal.project.local.ci.Linux delete mode 100644 .github/workflows/cabal.project.local.ci.MINGW64_NT-10.0-20348 diff --git a/.github/workflows/cabal.project.local.ci.Darwin b/.github/workflows/cabal.project.local.ci.Darwin deleted file mode 100644 index 415a21c29c..0000000000 --- a/.github/workflows/cabal.project.local.ci.Darwin +++ /dev/null @@ -1,5 +0,0 @@ -package cardano-crypto-praos - flags: -external-libsodium-vrf - -package HsOpenSSL - flags: +use-pkg-config diff --git a/.github/workflows/cabal.project.local.ci.Linux b/.github/workflows/cabal.project.local.ci.Linux deleted file mode 100644 index 415a21c29c..0000000000 --- a/.github/workflows/cabal.project.local.ci.Linux +++ /dev/null @@ -1,5 +0,0 @@ -package cardano-crypto-praos - flags: -external-libsodium-vrf - -package HsOpenSSL - flags: +use-pkg-config diff --git a/.github/workflows/cabal.project.local.ci.MINGW64_NT-10.0-20348 b/.github/workflows/cabal.project.local.ci.MINGW64_NT-10.0-20348 deleted file mode 100644 index 415a21c29c..0000000000 --- a/.github/workflows/cabal.project.local.ci.MINGW64_NT-10.0-20348 +++ /dev/null @@ -1,5 +0,0 @@ -package cardano-crypto-praos - flags: -external-libsodium-vrf - -package HsOpenSSL - flags: +use-pkg-config From 23f95f60392db9b6779272adfb4c11fad56dfa7d Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Wed, 3 Apr 2024 12:52:06 +0200 Subject: [PATCH 2/3] Use `program-options` --- cabal.project | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cabal.project b/cabal.project index 2dbf8a7bc3..635b6a760a 100644 --- a/cabal.project +++ b/cabal.project @@ -20,10 +20,7 @@ packages: cardano-api cardano-api-gen -package cardano-api - ghc-options: -Werror - -package cardano-api-gen +program-options ghc-options: -Werror package cryptonite From b4252d7b0e754b81ade22bdb8e83920cb5fd7555 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Wed, 3 Apr 2024 12:52:18 +0200 Subject: [PATCH 3/3] Default Windows' shell to msys2 one --- .github/workflows/haskell.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index d16ca922b9..38c809f405 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -11,18 +11,28 @@ on: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.sys.os }} strategy: fail-fast: false matrix: ghc: ["8.10.7", "9.6.4", "9.8.1"] cabal: ["3.10.2.0"] - os: [ubuntu-latest, macos-latest, windows-latest] + sys: + - { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' } + - { os: ubuntu-latest, shell: bash } + - { os: macos-latest, shell: bash} + + defaults: + run: + shell: ${{ matrix.sys.shell }} env: # Modify this value to "invalidate" the cabal cache. CABAL_CACHE_VERSION: "2024-02-15" + # these two are msys2 env vars, they have no effect on non-msys2 installs. + MSYS2_PATH_TYPE: inherit + MSYSTEM: MINGW64 concurrency: group: > @@ -31,7 +41,7 @@ jobs: c+${{ github.job }} d+${{ matrix.ghc }} e+${{ matrix.cabal }} - f+${{ matrix.os }} + f+${{ matrix.sys.os }} g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }} cancel-in-progress: true @@ -44,7 +54,7 @@ jobs: c+${{ github.job }} d+${{ matrix.ghc }} e+${{ matrix.cabal }} - f+${{ matrix.os }} + f+${{ matrix.sys.os }} g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }} - name: Install Haskell @@ -73,9 +83,6 @@ jobs: - name: Record dependencies id: record-deps run: | - # The tests call out to msys2 commands. We generally do not want to mix toolchains, so - # we are very deliberate about only adding msys64 to the path where absolutely necessary. - ${{ (runner.os == 'Windows' && '$env:PATH=("C:\msys64\mingw64\bin;{0}" -f $env:PATH)') || '' }} cat dist-newstyle/cache/plan.json | jq -r '."install-plan"[] | select(.style != "local") | .id' | sort | uniq > dependencies.txt # From the dependency list we restore the cached dependencies. @@ -111,16 +118,12 @@ jobs: - name: Run tests env: - # these two are msys2 env vars, they have no effect on non-msys2 installs. - MSYS2_PATH_TYPE: inherit - MSYSTEM: MINGW64 TMPDIR: ${{ runner.temp }} TMP: ${{ runner.temp }} KEEP_WORKSPACE: 1 run: cabal test all --enable-tests --test-show-details=direct -j1 - name: "Tar artifacts" - shell: bash run: | mkdir -p artifacts @@ -139,7 +142,7 @@ jobs: - name: Save Artifact uses: actions/upload-artifact@v3 with: - name: artifacts-${{ matrix.os }}-${{ matrix.ghc }} + name: artifacts-${{ matrix.sys.os }}-${{ matrix.ghc }} path: ./artifacts # Uncomment the following back in for debugging. Remember to launch a `pwsh` from