From b8a7a3723397990df97759ec80f77334c06c205c Mon Sep 17 00:00:00 2001 From: gtrepta <50716988+gtrepta@users.noreply.github.com> Date: Thu, 8 Feb 2024 05:03:09 -0600 Subject: [PATCH] Set up testing workflow (#8) * Set up testing workflow * Fix ordering in some declarations * Add event triggers * Test workflow rework * change concurrency group to use the workflow name and branch running it --------- Co-authored-by: F-WRunTime --- .github/workflows/test.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..501f8f00 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,32 @@ +name: 'Test PR' +on: + pull_request: + types: [opened, edited, reopened, synchronize] + branches: + - 'master' + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-test: + name: 'Build And Test' + runs-on: [self-hosted, linux, normal] + steps: + - name: 'Check out code' + uses: actions/checkout@v3 + with: + submodules: recursive + - name: 'Start Docker container' + run: | + COMMIT="$(cat deps/k_release)" + docker run --name gh-runner-ci --rm -it --detach --workdir /opt/workspace --user $(id -u):$(id -g) -v "$(pwd):/opt/workspace" -v "/etc/passwd:/etc/passwd:ro" -v "/etc/group:/etc/group:ro" runtimeverificationinc/kframework-k:ubuntu-jammy-${COMMIT} + - name: 'Start K Server' + run: docker exec --detach gh-runner-ci /bin/bash -c 'kserver' + - name: 'Test PL-Tutorial' + run: docker exec -t gh-runner-ci /bin/bash -c 'make -j4' + - name: 'Tear down Docker container' + if: always() + run: | + docker stop gh-runner-ci