Skip to content

Commit

Permalink
Enable Setting Specific Kontrol version to build with (#944)
Browse files Browse the repository at this point in the history
* modified:   .github/workflows/kontrol-push-unfixed-deps.yml
- Introduce using --version with kup to specify a branch of kontrol to
  run with. This will pull from the branch used to run the workflow
dispatch job

* Move to using an input to specify kontrol version instead of workflow version, these can fall out of sync

* enable package permissions write for workflow

* Use the github token with kup to avoid hitting API limit issues
  • Loading branch information
F-WRunTime authored Jan 27, 2025
1 parent 8d7b584 commit 2d74ed4
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/kontrol-push-unfixed-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@ name: 'Push Kontrol w/ Dependencies'
on:
workflow_dispatch:
inputs:
kontrol-version:
description: 'Branch/Tag to use for Kontrol'
required: false
default: ''
kevm-version:
description: 'Branch/Tag to use for KEVM'
description: 'SHA to use for KEVM'
required: false
default: ''
k-version:
description: 'Branch/Tag to use for K'
description: 'SHA to use for K'
required: false
default: ''
llvm-version:
description: 'Branch/Tag to use for LLVM Backend'
description: 'SHA to use for LLVM Backend'
required: false
default: ''
haskell-version:
description: 'Branch/Tag to use for Haskell Backend'
description: 'SHA to use for Haskell Backend'
required: false
default: ''
permissions:
packages: write

jobs:
build-kontrol:
Expand All @@ -34,7 +40,10 @@ jobs:
shell: bash
run: |
set -o pipefail
docker run --rm -it --detach --name kontrol-build-with-kup-${{ github.run_id }} ghcr.io/runtimeverification/kup:latest
docker run --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} --rm -it --detach --name kontrol-build-with-kup-${{ github.run_id }} ghcr.io/runtimeverification/kup:latest
if [ -n "${{ inputs.kontrol-version }}" ]; then
KONTROL_OVERRIDE="--version ${{ inputs.kontrol-version }}"
fi
if [ -n "${{ inputs.kevm-version }}" ]; then
KEVM_OVERRIDE="--override kevm ${{ inputs.kevm-version }}"
fi
Expand All @@ -47,7 +56,7 @@ jobs:
if [ -n "${{ inputs.haskell-version }}" ]; then
HASKELL_OVERRIDE="--override kevm/k-framework/haskell-backend ${{ inputs.haskell-version }}"
fi
docker exec kontrol-build-with-kup-${{ github.run_id }} /bin/bash -c "kup install kontrol ${KEVM_OVERRIDE} ${K_OVERRIDE} ${LLVM_OVERRIDE} ${HASKELL_OVERRIDE}"
docker exec kontrol-build-with-kup-${{ github.run_id }} /bin/bash -c "kup install kontrol ${KONTROL_OVERRIDE} ${KEVM_OVERRIDE} ${K_OVERRIDE} ${LLVM_OVERRIDE} ${HASKELL_OVERRIDE}"
docker exec kontrol-build-with-kup-${{ github.run_id }} /bin/bash -c "kup list kontrol --inputs" >> versions.out
docker commit kontrol-build-with-kup-${{ github.run_id }} ghcr.io/runtimeverification/kontrol-custom:${{ github.run_id }}
docker push ghcr.io/runtimeverification/kontrol-custom:${{ github.run_id }}
Expand Down

0 comments on commit 2d74ed4

Please sign in to comment.