Skip to content

Commit

Permalink
add pact version call to verify linking (#1350)
Browse files Browse the repository at this point in the history
* add pact version call to verify linking

* check pact version after nix build

* remove stale include

* nix use nixrunversion, macos m1 cabal runner

* update local build opts

* use non-deprecated haskell action

* keep M1 from testing (fails hugenum)

---------

Co-authored-by: June <[email protected]>
Co-authored-by: DevopsGoth <[email protected]>
  • Loading branch information
3 people authored Mar 7, 2024
1 parent 3520f93 commit 34f5971
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '**'
- '!.github/**'
- '.github/workflows/applications.yml'

pull_request_target:
types: [ opened ]

Expand All @@ -20,16 +20,15 @@ jobs:
matrix:
ghc: ['9.6']
cabal: ['3.10']
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macOS-latest']
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macOS-latest', 'macos-14']
cabalcache: ['true']
flags: ['+build-tool']
include:
- os: 'ubuntu-22.04'
- os: 'ubuntu-20.04'
ghc: '9.6'
cabal: '3.10'
cabalcache: 'true'
flags: '-build-tool'

env:
AWS_ACCESS_KEY_ID: ${{ secrets.kadena_cabal_cache_aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.kadena_cabal_cache_aws_secret_access_key }}
Expand Down Expand Up @@ -78,7 +77,7 @@ jobs:
if: startsWith(matrix.os, 'ubuntu-')
run: sudo chown -R $USER /usr/local/.ghcup
- name: Install GHC and Cabal
uses: haskell/actions/setup@v2
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
Expand All @@ -99,6 +98,12 @@ jobs:
documentation: False
optimization: 1
flags: ${{ matrix.flags }} +cryptonite-ed25519
extra-include-dirs:
/opt/local/include
/usr/local/opt/openssl/include
extra-lib-dirs:
/opt/local/lib
/usr/local/opt/openssl/lib/
EOF
- name: Extend cabal.project.local for GHC-9.0.2
if: "startsWith(matrix.ghc, '9')"
Expand Down Expand Up @@ -153,12 +158,17 @@ jobs:
shell: bash
run: cabal build
- name: Test
if: (matrix.os != 'macos-14')
shell: bash
run: cabal run tests
- name: Benchmark
shell: bash
if: "!contains(matrix.flags, '-build-tool')"
run: cabal bench
- name: Verify Binary Linking
shell: bash
if: "!contains(matrix.flags, '-build-tool')"
run: cabal run exe:pact -- --version

# Publish Artifacts
- name: Prepare artifacts
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
echo Build the recursive output
nix build .#recursive.allDerivations --log-lines 500 --show-trace
- name: Verify pact binary
run: |
echo Validating pact version
nix run pact --version
build-and-cache-on-mac:
runs-on: ${{ matrix.os }}
timeout-minutes: 740
Expand Down Expand Up @@ -79,3 +84,9 @@ jobs:
echo Build the recursive output
nix build .#recursive.allDerivations --log-lines 500 --show-trace
- name: Verify pact binary
run: |
echo Validating pact version
nix run pact --version

0 comments on commit 34f5971

Please sign in to comment.