diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml index 07f2e08225f..a013bf6c228 100644 --- a/.github/workflows/github-page.yml +++ b/.github/workflows/github-page.yml @@ -70,19 +70,24 @@ jobs: sudo apt-get -y remove --purge software-properties-common sudo apt-get -y autoremove - - uses: actions/cache@v3 - name: "Cache secp256k1" + - name: Install secp256k1 + uses: input-output-hk/setup-secp256k1@v1 with: - path: secp256k1 - key: cache-secp256k1-${{ runner.os }}-${{ env.SECP_CACHE_VERSION }} - restore-keys: cache-secp256k1-${{ runner.os }}-${{ env.SECP_CACHE_VERSION }} + git-ref: ${{ env.SECP256K1_REF }} + cache-version: ${{ env.SECP_CACHE_VERSION }} - - name: "Install secp256k1" + - name: Show paths shell: bash - env: - CI_SECP_FLAGS: "--prefix=/usr/local" - CI_SECP_INSTALL_CMD: sudo - run: bash .github/workflows/build-secp256k1.bash + run: | + echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" + + - name: List all pkg-config packages + 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)') || '' }} + pkg-config --list-all - name: Cabal update run: cabal update diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index be26eb671f1..2ee1fc2bca2 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -29,7 +29,7 @@ jobs: env: # Modify this value to "invalidate" the cabal cache. - CABAL_CACHE_VERSION: "2022-12-28" + CABAL_CACHE_VERSION: "2022-12-28-a" # Modify this value to "invalidate" the secp cache. SECP_CACHE_VERSION: "2022-12-23" @@ -155,33 +155,24 @@ jobs: if: runner.os == 'macOS' run: brew install autoconf automake libtool - - uses: actions/cache@v3 - name: "Cache secp256k1" + - name: Install secp256k1 + uses: input-output-hk/setup-secp256k1@v1 with: - path: secp256k1 - key: cache-secp256k1-${{ runner.os }}-${{ env.SECP_CACHE_VERSION }} - restore-keys: cache-secp256k1-${{ runner.os }}-${{ env.SECP_CACHE_VERSION }} + git-ref: ${{ env.SECP256K1_REF }} + cache-version: ${{ env.SECP_CACHE_VERSION }} - - name: "LINUX: Install secp256k1" - if: runner.os != 'Windows' + - name: Show paths shell: bash - env: - CI_SECP_FLAGS: "--prefix=/usr/local" - CI_SECP_INSTALL_CMD: sudo - run: bash .github/workflows/build-secp256k1.bash + run: | + echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" - # TODO: this really should come from a pre-built location - - name: "WIN: Install secp256k1" - if: runner.os == 'Windows' - # Same env as tmate action - env: - MSYS2_PATH_TYPE: inherit - MSYSTEM: MINGW64 - CHERE_INVOKING: 1 - # install secp into /mingw64 prefix, which is where pkg-config will look - # by default. - CI_SECP_FLAGS: "--prefix=/mingw64" - run: C:\\msys64\\usr\\bin\\bash.exe .github/workflows/build-secp256k1.bash + - name: List all pkg-config packages + 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)') || '' }} + pkg-config --list-all - name: Cabal update run: cabal update @@ -199,13 +190,6 @@ jobs: echo "# cabal.project.local" cat cabal.project.local - - name: List all pkg-config packages - 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)') || '' }} - pkg-config --list-all - - name: Build dry run run: | # The tests call out to msys2 commands. We generally do not want to mix toolchains, so