Skip to content

Commit

Permalink
Package Nix flake (#255)
Browse files Browse the repository at this point in the history
* Implement Nix flake build

* Run Nix build matrix

* Set Version: 0.1.73

* Add missing dependencies

* Set Version: 0.1.74

* Set Version: 0.1.74

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
Baltoli and devops authored Jun 6, 2024
1 parent 2c88a73 commit 9dbece3
Show file tree
Hide file tree
Showing 9 changed files with 1,417 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,22 @@ jobs:
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}
nix:
name: 'Build using Nix'
strategy:
fail-fast: false
matrix:
include:
- runner: normal
- runner: ARM64
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
# Check out pull request HEAD instead of merge commit.
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Build KMultiversX'
run: GC_DONT_GC=1 nix build .#kmultiversx --extra-experimental-features 'nix-command flakes' --print-build-logs
9 changes: 9 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,14 @@ jobs:
K_VERSION=$(poetry -C kmultiversx run python3 -c 'import pyk; print(pyk.__version__)')
echo ${K_VERSION} > deps/k_release
git add deps/k_release && git commit -m "deps/k_release: sync release file version ${K_VERSION}" || true
- name: 'Update Nix flake inputs'
run: |
K_VERSION="$(cat deps/k_release)"
PYKWASM_VERSION="$(cat deps/kwasm_release)"
sed -i 's! k-framework.url = "github:runtimeverification/k/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+"! k-framework.url = "github:runtimeverification/k/'"v${K_VERSION}"'"!' flake.nix
sed -i 's! pyk.url = "github:runtimeverification/k/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+?dir=pyk"! pyk.url = "github:runtimeverification/k/'"v${K_VERSION}"'?dir=pyk"!' flake.nix
sed -i 's! wasm-semantics.url = "github:runtimeverification/wasm-semantics/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+"! wasm-semantics.url = "github:runtimeverification/wasm-semantics/'"v${PYKWASM_VERSION}"'"!' flake.nix
nix flake update
git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true
- name: 'Push updates'
run: git push
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ tmp
*.pyc
venv
.hypothesis
result
Loading

0 comments on commit 9dbece3

Please sign in to comment.