@@ -0,0 +1,50 @@
1+name: "Test secp256k1 on windows"
2+on: workflow_dispatch
3+jobs:
4+ tests:
5+ runs-on: windows-latest
6+
7+ defaults:
8+ run:
9+ shell: bash
10+
11+ steps:
12+
13+ - uses: haskell/actions/setup@v1
14+ id: setup-haskell
15+ with:
16+ ghc-version: 8.10.7
17+ cabal-version: 3.6.2.0
18+
19+ - name: Install pkgconfiglite
20+ run: choco install -y pkgconfiglite
21+
22+ - name: Install libsecp256k1
23+ run: |
24+ curl -Ls \
25+ --connect-timeout 5 \
26+ --max-time 10 \
27+ --retry 5 \
28+ --retry-delay 0 \
29+ --retry-max-time 40 \
30+ https://hydra.iohk.io/job/Cardano/haskell-nix/windows-secp256k1/latest/download/1 -o secp256k1.zip
31+ mkdir secp256k1
32+ cd secp256k1
33+ unzip ../secp256k1.zip
34+ cd ..
35+ export PKG_CONFIG_PATH="$(readlink -f secp256k1/lib/pkgconfig)"
36+ echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
37+ export SECP256K1_PATH="$(readlink -f secp256k1/bin | tr / '\\')"
38+ echo "$SECP256K1_PATH" >> $GITHUB_PATH
39+
40+ - name: Cabal update
41+ run: cabal update
42+
43+ - name: Build and run haskell-secp256k1 tests
44+ run: |
45+ cabal unpack secp256k1-haskell
46+ cd secp256k1-haskell-*
47+ cabal build --enable-tests
48+ cp ../secp256k1/bin/*.dll dist-newstyle/build/x86_64-windows/ghc-*/secp256k1-haskell-*/t/spec/build/spec/
49+ cabal test
50+