-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 2.11 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 'Update Version'
on:
push:
branches:
- '_update-deps/runtimeverification/wasm-semantics'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-deps:
name: 'Update Dependecies'
runs-on: [self-hosted, linux, flyweight]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.JENKINS_GITHUB_PAT }}
- name: 'Configure GitHub user'
run: |
git config user.name devops
git config user.email devops@runtimeverification.com
- name: 'Install Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v9
- name: 'Update Poetry files'
run: |
PYKWASM_VERSION="$(cat deps/kwasm_release)"
sed -i 's!pykwasm = { git = "https://github.com/runtimeverification/wasm-semantics.git", tag = "[v0-9\.]*", subdirectory = "pykwasm" }!pykwasm = { git = "https://github.com/runtimeverification/wasm-semantics.git", tag = "v'${PYKWASM_VERSION}'", subdirectory = "pykwasm" }!' pyproject.toml
poetry update
git add . && git commit -m "Sync Poetry files ${PYKWASM_VERSION}" || true
- name: 'Update K release'
run: |
K_VERSION=$(poetry 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: |
PYKWASM_VERSION=v"$(cat deps/kwasm_release)"
sed -i 's! wasm-semantics.url = "github:runtimeverification/wasm-semantics/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+"! wasm-semantics.url = "github:runtimeverification/wasm-semantics/'"${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