Skip to content

DEBUG hijack publish-js workflow for testing #1

DEBUG hijack publish-js workflow for testing

DEBUG hijack publish-js workflow for testing #1

name: Publish JS Client

Check failure on line 1 in .github/workflows/publish-js-client.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-js-client.yml

Invalid workflow file

(Line: 93, Col: 7): A sequence was not expected
on:
workflow_dispatch:
inputs:
level:
description: Version level
required: true
default: patch
type: choice
options:
- patch
- minor
- major
- prerelease
- prepatch
- preminor
- premajor
tag:
description: NPM Tag (and preid for pre-releases)
required: true
type: string
default: latest
create_release:
description: Create a GitHub release
required: true
type: boolean
default: true
# DEBUGGING NEW WORKFLOW, RESTORE THIS FILE AFTER IT IS FINISHED
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
smir: ""
kmir: "p-token-f8c403f"
proofs: "['test_ptoken_domain_data', 'this_will_fail']"
jobs:
compile:
name: "Compile P-Token to SMIR JSON"
runs-on: ubuntu-latest
steps:
- name: "Git Checkout"
uses: actions/checkout@v4
- name: "Provide nightly Rust" # https://github.com/rust-lang/rustup/issues/3409
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-29 # Hardcoded version for stable-mir-json. TODO can we use nix?
- name: "Provide Nix"
uses: cachix/install-nix-action@v18
- name: "Build with stable_mir_json"
uses: cachix/nix-shell-action@v3
with:
flakes: github:runtimeverification/stable-mir-json/${{ env.smir }}
script: |
cd p-token
RUSTC=stable_mir_json cargo build --features runtime-verification
- name: "Store SMIR JSON files"
uses: actions/upload-artifact@v4
with:
name: p-token.smir
path: ./target/debug/deps/*.smir.json
if-no-files-found: error
retention-days: 1 # only important during workflow run
prepare_matrix:
name: "Prepare proof matrix"
runs-on: ubuntu-latest
outputs:
proofs: ${{ steps.split.outputs.matrix }}
steps:
- name: "Create Proof Array"
run: |
echo "proofs = '${{ env.proofs }}'"
echo "matrix=${{ env.proofs }}" >> $GITHUB_OUTPUT
run_proof:
name: "Link SMIR and Run Proofs"
needs: compile, prepare_matrix
runs-on: ubuntu-latest
# container:
# image: runtimeverificationinc/kmir:${{ inputs.kmir }}
strategy:
matrix:
proof: ${{ fromJSON(needs.prepare_matrix.outputs.proofs) }}
env:
- RUNNER_NAME: "kmir-${{ github.sha }}"
steps:
- name: debug matrix and docker image
run: |
echo "This is proof ${{ matrix.proof }}"
echo "Running with docker image runtimeverificationinc/kmir:${{ env.kmir }}"
- name: Fail
run: exit 1
# - name: "Checkout"
# uses: actions/checkout@v4
# - name: "Set up Docker host"
# run: |
# docker run --rm --detach \
# --user github-user \
# -v $PWD:/workdir --workdir /workdir \
# --name "${RUNNER_NAME}" \
# runtimeverificationinc/kmir:${{ inputs.kmir }}
# sleep 10
# - name: "Get SMIR Files"
# uses: actions/download-artifact@v5
# with:
# name: p-token.smir
# path: p-token/test-properties/artefacts/
# - name: "Link SMIR Files"
# run: |
# docker exec --user github-user --workdir /workdir/p-token/test-properties/artefacts/ "${RUNNER_NAME}" \
# bash -c 'kmir link -o p-token.smir.json *.smir.json'
# - name: "Run Proof ${{ matrix.proof }} with default proof settings"
# run: |
# docker exec --user github-user --workdir /workdir/p-token/test-properties/ "${RUNNER_NAME}" \
# ./run-proofs.sh ${{ matrix.proof }}'
# - name: "Shut down docker image"
# if: always
# run: |
# docker stop ${RUNNER_NAME}
# sleep 5
# docker rm -f ${RUNNER_NAME}