deps/plugin: Set Version 8031e7be727e903b817fff6639a9d3a4bbe82f11 #2305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Update Version' | |
on: | |
push: | |
branches: | |
- '_update-deps/runtimeverification/k' | |
- '_update-deps/runtimeverification/blockchain-k-plugin' | |
- '_update-deps/runtimeverification/pyk' | |
workflow_dispatch: | |
# Stop in progress workflows on the same branch and same workflow to use latest committed code | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update-versions: | |
name: 'Update K and kavm versions' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
- run: | | |
git config user.name devops | |
git config user.email [email protected] | |
- name: 'Install Python3.10' | |
run: | | |
sudo apt-get install --yes software-properties-common | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt-get update | |
sudo apt-get install --yes python3.10 | |
- name: 'Update K submodule' | |
run: | | |
K_VERSION="$(cat deps/k_release)" | |
cd deps/k | |
git fetch --tags | |
git checkout "v${K_VERSION}" | |
cd - | |
git add deps/k && git commit -m "deps/k: update submodule ${K_VERSION}" || true | |
- name: 'Update plugin release tag' | |
run: | | |
cd deps/plugin | |
rev=$(git rev-parse HEAD) | |
cd - | |
echo ${rev} > deps/blockchain-k-plugin_release | |
sed -i 's! blockchain-k-plugin.url = "github:runtimeverification/blockchain-k-plugin/[0-9a-f]*"! blockchain-k-plugin.url = "github:runtimeverification/blockchain-k-plugin/'"${rev}"'"!' flake.nix | |
git add deps/blockchain-k-plugin_release && git commit -m "deps/blockchain-k-plugin_release: update release file ${rev}" || true | |
- name: 'Update pyk Release tag' | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
poetry --version | |
pyk_version="$(cat deps/pyk_release)" | |
sed -i 's!pyk = { git = "https://github.com/runtimeverification/pyk.git", tag="[v0-9\.]*" }!pyk = { git = "https://github.com/runtimeverification/pyk.git", tag="'${pyk_version}'" }!' kavm/pyproject.toml | |
sed -i 's! pyk.url = "github:runtimeverification/pyk/[v0-9\.]*"! pyk.url = "github:runtimeverification/pyk/'"${pyk_version}"'"!' flake.nix | |
cd kavm | |
poetry update | |
cd - | |
git add kavm/ && git commit -m "kavm/: sync poetry files ${pyk_version}" || true | |
- name: 'Install Nix' | |
uses: cachix/install-nix-action@v22 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: 'Install Cachix' | |
uses: cachix/cachix-action@v12 | |
with: | |
name: k-framework | |
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }} | |
skipPush: true | |
- name: 'Update nix flake inputs' | |
run: | | |
nix run .#update-from-submodules | |
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 |