Skip to content

Commit

Permalink
Merge #3687
Browse files Browse the repository at this point in the history
3687: Install libsecp256k1 on Windows  r=amesgen a=amesgen

Closes #3678, alternative to #3683

This installs the prebuilt libsecp256k1 DLL built via input-output-hk/haskell.nix#1424.

Co-authored-by: Alexander Esgen <alexander.esgen@iohk.io>
Co-authored-by: Marcin Szamotulski <coot@coot.me>
Co-authored-by: iohk-bors[bot] <43231472+iohk-bors[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 5, 2022
2 parents fa10cb4 + 20cb4f7 commit e850e30
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
tar zxvf libsodium-1.0.18-mingw.tar.gz
sed -i "s|/d/a/1/s/|$RUNNER_TEMP_FWD\/|g" libsodium-win64/lib/pkgconfig/libsodium.pc
export PKG_CONFIG_PATH="$(readlink -f libsodium-win64/lib/pkgconfig)"
export PKG_CONFIG_PATH="$(readlink -f libsodium-win64/lib/pkgconfig | sed 's|^/d|D:|g' | tr / '\\')"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
Expand Down Expand Up @@ -105,6 +105,34 @@ jobs:
sudo make install
cd ../..
- name: Install secp256k1 (Windows)
if: matrix.os == 'windows-latest'
env:
RUNNER_TEMP: ${{ runner.temp }}
run: |
echo "RUNNER_TEMP=$RUNNER_TEMP"
cd "$RUNNER_TEMP"
RUNNER_TEMP_FWD="$(echo "$RUNNER_TEMP" | sed 's|\\|/|g')"
curl -Ls \
--connect-timeout 5 \
--max-time 10 \
--retry 5 \
--retry-delay 0 \
--retry-max-time 40 \
https://hydra.iohk.io/job/Cardano/haskell-nix/windows-secp256k1/latest/download/1 -o secp256k1.zip
mkdir secp256k1
cd secp256k1
unzip ../secp256k1.zip
cd ..
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH;$(readlink -f secp256k1/lib/pkgconfig | sed 's|^/d|D:|g' | tr / '\\')"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
export SECP256K1_PATH="$(readlink -f secp256k1/bin | sed 's|^/d|D:|g' | tr / '\\')"
echo "SECP256K1_PATH=$SECP256K1_PATH"
echo "$SECP256K1_PATH" >> $GITHUB_PATH
- name: Set up temp directory
env:
RUNNER_TEMP: ${{ runner.temp }}
Expand Down
2 changes: 2 additions & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
status = [
"ci/hydra:Cardano:ouroboros-network:required",
"build (8.10.7, ubuntu-20.04)",
"build (8.10.7, windows-latest)",
]
timeout_sec = 7200
required_approvals = 1
Expand Down

0 comments on commit e850e30

Please sign in to comment.