From d4c1ba85ceaa0ad16fd478009b6fb2af541c3e54 Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:19:15 -0600 Subject: [PATCH 1/5] Set up testing workflow --- .github/workflows/test.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..7638fb38 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,30 @@ +name: 'Test PR' +on: + pull_request: + 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 From e0bc4fd8c73cf24aff03fe74d9305cec75755f97 Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:37:10 -0600 Subject: [PATCH 2/5] Fix ordering in some declarations --- .github/workflows/test.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7638fb38..f499d7ef 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,12 +1,12 @@ name: 'Test PR' -on: - pull_request: - branches: - - 'master' - workflow_dispatch: - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + on: + pull_request: + branches: + - 'master' + workflow_dispatch: jobs: build-test: name: 'Build And Test' From 43da939caf39c5fdbb7027989d9887b086c725bd Mon Sep 17 00:00:00 2001 From: Guy Repta <50716988+gtrepta@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:45:36 -0600 Subject: [PATCH 3/5] Add event triggers --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f499d7ef..2e5a9f70 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,6 +4,7 @@ concurrency: cancel-in-progress: true on: pull_request: + types: [opened, edited, reopened, synchronize] branches: - 'master' workflow_dispatch: From 17f6e5be4c8502439019a2cd64c9cfd372cfb2db Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 7 Feb 2024 13:11:36 -0700 Subject: [PATCH 4/5] Test workflow rework --- .github/workflows/test.yaml | 57 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2e5a9f70..1e8127e7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,31 +1,32 @@ name: 'Test PR' +on: + pull_request: + types: [opened, edited, reopened, synchronize] + branches: + - 'master' + workflow_dispatch: concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: 'pl-test' cancel-in-progress: true - on: - pull_request: - types: [opened, edited, reopened, synchronize] - branches: - - 'master' - workflow_dispatch: - 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 + +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 From 8024db484c530b36303a817f577603633f34589a Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 7 Feb 2024 13:15:50 -0700 Subject: [PATCH 5/5] change concurrency group to use the workflow name and branch running it --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1e8127e7..501f8f00 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,7 @@ on: - 'master' workflow_dispatch: concurrency: - group: 'pl-test' + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: