From 0b239f46a39649dd7ef982ad4c9af7c6a8fd86ee Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Mon, 20 Nov 2023 13:35:41 +0100 Subject: [PATCH] Cleanup - Update cabal cache - Cleanup yml files - Update ci to Cabal 3.10.2.0 - Move `Changelog.md` to the appropiate section in cabal files --- .github/workflows/cabal.project.local.ci | 2 + .../workflows/cabal.project.local.ci.Darwin | 5 --- .../workflows/cabal.project.local.ci.Linux | 5 --- ...bal.project.local.ci.MINGW64_NT-10.0-20348 | 5 --- .../cabal.project.local.github-pages | 3 -- .github/workflows/check-cabal-files.yml | 9 +---- .github/workflows/github-page.yml | 38 +++++-------------- .github/workflows/haskell.yml | 21 ++-------- cardano-node-capi/cardano-node-capi.cabal | 2 +- cardano-node/cardano-node.cabal | 2 +- cardano-submit-api/cardano-submit-api.cabal | 2 +- cardano-testnet/cardano-testnet.cabal | 2 +- 12 files changed, 21 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/cabal.project.local.ci 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 b/.github/workflows/cabal.project.local.ci new file mode 100644 index 00000000000..6a1d077fa8e --- /dev/null +++ b/.github/workflows/cabal.project.local.ci @@ -0,0 +1,2 @@ +package HsOpenSSL + flags: +use-pkg-config diff --git a/.github/workflows/cabal.project.local.ci.Darwin b/.github/workflows/cabal.project.local.ci.Darwin deleted file mode 100644 index 415a21c29cb..00000000000 --- 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 415a21c29cb..00000000000 --- 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 415a21c29cb..00000000000 --- 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 diff --git a/.github/workflows/cabal.project.local.github-pages b/.github/workflows/cabal.project.local.github-pages index cf95959882d..78cd755dfdc 100644 --- a/.github/workflows/cabal.project.local.github-pages +++ b/.github/workflows/cabal.project.local.github-pages @@ -2,7 +2,4 @@ write-ghc-environment-files: always ignore-project: False -package cardano-crypto-praos - flags: -external-libsodium-vrf - tests: False diff --git a/.github/workflows/check-cabal-files.yml b/.github/workflows/check-cabal-files.yml index 05213bb8a34..f30d2e80f18 100644 --- a/.github/workflows/check-cabal-files.yml +++ b/.github/workflows/check-cabal-files.yml @@ -9,16 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - - name: Workaround runner image issue - if: runner.os == 'Linux' - # https://github.com/actions/runner-images/issues/7061 - run: sudo chown -R $USER /usr/local/.ghcup - - name: Install Haskell - uses: input-output-hk/setup-haskell@v1 + uses: input-output-hk/actions/haskell@latest id: setup-haskell with: - cabal-version: "3.10.1.0" + cabal-version: "3.10.2.0" - uses: actions/checkout@v3 diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml index cda9c11aa8d..994f71f3cc8 100644 --- a/.github/workflows/github-page.yml +++ b/.github/workflows/github-page.yml @@ -16,59 +16,39 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["9.2.7"] - cabal: ["3.10.1.0"] + ghc: ["9.2.8"] + cabal: ["3.10.2.0"] os: [ubuntu-latest] env: # Modify this value to "invalidate" the cabal cache. CABAL_CACHE_VERSION: "2023-07-28" - # Modify this value to "invalidate" the secp cache. - SECP_CACHE_VERSION: "2022-12-30" - - # current ref from: 27.02.2022 - SECP256K1_REF: ac83be33d0956faf6b7f61a60ab524ef7d6a473a - steps: - - name: Workaround runner image issue - if: runner.os == 'Linux' - # https://github.com/actions/runner-images/issues/7061 - run: sudo chown -R $USER /usr/local/.ghcup - - name: Install Haskell - uses: input-output-hk/setup-haskell@v1 + uses: input-output-hk/actions/haskell@latest id: setup-haskell with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - name: Install system dependencies + uses: input-output-hk/actions/base@latest + with: + use-sodium-vrf: true # default is true + - uses: actions/checkout@v3 - name: Add build script path run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH - - name: Install build environment - run: | - sudo apt-get update - sudo apt-get -y install libsodium23 libsodium-dev - sudo apt-get -y install libsystemd0 libsystemd-dev - sudo apt-get -y remove --purge software-properties-common - sudo apt-get -y autoremove - - - name: Install secp256k1 - uses: input-output-hk/setup-secp256k1@v1 - with: - git-ref: ${{ env.SECP256K1_REF }} - cache-version: ${{ env.SECP_CACHE_VERSION }} - - name: Cabal update run: cabal update - name: combine github-pages, and machine local project files. run: | cat .github/workflows/cabal.project.local.github-pages \ - ".github/workflows/cabal.project.local.ci.$(uname -s)" \ + .github/workflows/cabal.project.local.ci \ | tee cabal.project.local - name: Dry run diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 47f0f005987..e3ae77a01af 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -25,19 +25,13 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["9.2.7", "9.6.2"] - cabal: ["3.10.1.0"] + ghc: ["9.2.8", "9.6.3"] + cabal: ["3.10.2.0"] os: [macos-latest, windows-latest, ubuntu-latest] env: # Modify this value to "invalidate" the cabal cache. - CABAL_CACHE_VERSION: "2023-10-04" - - # Modify this value to "invalidate" the secp cache. - SECP_CACHE_VERSION: "2022-12-30" - - # current ref from: 27.02.2022 - SECP256K1_REF: ac83be33d0956faf6b7f61a60ab524ef7d6a473a + CABAL_CACHE_VERSION: "2023-11-20" concurrency: group: > @@ -82,7 +76,7 @@ jobs: - name: Configure build shell: bash run: | - cp ".github/workflows/cabal.project.local.ci.$(uname -s)" cabal.project.local + cp .github/workflows/cabal.project.local.ci cabal.project.local echo "# cabal.project.local" cat cabal.project.local @@ -178,13 +172,6 @@ jobs: fi done - - name: Save Artifact - if: matrix.ghc == '8.10.7' - uses: actions/upload-artifact@v1 - with: - name: artifacts-${{ matrix.os }} - path: ./artifacts - - name: Delete socket files in chairman tests in preparation for uploading artifacts if: ${{ always() }} shell: bash diff --git a/cardano-node-capi/cardano-node-capi.cabal b/cardano-node-capi/cardano-node-capi.cabal index aba6efbd4e2..22bd9634411 100644 --- a/cardano-node-capi/cardano-node-capi.cabal +++ b/cardano-node-capi/cardano-node-capi.cabal @@ -12,7 +12,7 @@ maintainer: operations@iohk.io license: Apache-2.0 license-files: LICENSE NOTICE -extra-source-files: CHANGELOG.md +extra-doc-files: CHANGELOG.md common project-config default-language: Haskell2010 diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal index 97474fc5651..fcb0efd68af 100644 --- a/cardano-node/cardano-node.cabal +++ b/cardano-node/cardano-node.cabal @@ -13,7 +13,7 @@ license: Apache-2.0 license-files: LICENSE NOTICE build-type: Simple -extra-source-files: ChangeLog.md +extra-doc-files: ChangeLog.md Flag unexpected_thunks Description: Turn on unexpected thunks checks diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal index 226944efd7d..467ca2410dd 100644 --- a/cardano-submit-api/cardano-submit-api.cabal +++ b/cardano-submit-api/cardano-submit-api.cabal @@ -15,7 +15,7 @@ maintainer: operations@iohk.io category: Cardano, Web, build-type: Simple -extra-source-files: CHANGELOG.md +extra-doc-files: CHANGELOG.md common project-config default-language: Haskell2010 diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index 2e8f06086fa..e2c33bf1593 100644 --- a/cardano-testnet/cardano-testnet.cabal +++ b/cardano-testnet/cardano-testnet.cabal @@ -13,7 +13,7 @@ license: Apache-2.0 license-files: LICENSE NOTICE build-type: Simple - +extra-doc-files: CHANGELOG.md common project-config default-language: Haskell2010