-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mulWad-proofs
- Loading branch information
Showing
3 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'With Docker' | ||
description: 'Run a given stage with Docker Image' | ||
inputs: | ||
container-version: | ||
description: 'Docker Image Version' | ||
required: true | ||
container-name: | ||
description: 'Docker Container Name' | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Set up Docker' | ||
shell: bash {0} | ||
run: | | ||
set -euxo pipefail | ||
CONTAINER_NAME=${{inputs.container-name}} | ||
CONTAINER_VERSION=${{inputs.container-version}} | ||
docker run \ | ||
--name ${CONTAINER_NAME} \ | ||
--rm \ | ||
--interactive \ | ||
--tty \ | ||
--detach \ | ||
--user root \ | ||
--workdir /home/user/workspace \ | ||
runtimeverificationinc/kontrol:ubuntu-jammy-${CONTAINER_VERSION} | ||
# Copy the current Checkout direcotry into the container | ||
docker cp . ${CONTAINER_NAME}:/home/user/workspace | ||
docker exec ${CONTAINER_NAME} chown -R user:user /home/user |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: 'Update Version' | ||
name: 'Test PR' | ||
on: | ||
pull_request: | ||
branches: | ||
|
@@ -11,52 +11,43 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
set-image-version: | ||
name: 'Set Image Version' | ||
runs-on: [self-hosted, linux, flyweight] | ||
outputs: | ||
image-version: ${{ steps.image-version.outputs.kontrol_version }} | ||
steps: | ||
- name: 'Check out code' | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 'Set Image Version' | ||
id: image-version | ||
run: | | ||
kontrol_version=$(cat deps/kontrol_release) | ||
echo "kontrol_version=${kontrol_version}" >> $GITHUB_ENV | ||
new-version-test: | ||
name: 'Test Tool Update' | ||
name: 'Test Proofs' | ||
runs-on: [self-hosted, linux, normal] | ||
needs: [set-image-version] | ||
container: | ||
image: runtimeverificationinc/kontrol:ubuntu-jammy-${{ needs.set-image-version.outputs.image-version }} | ||
steps: | ||
- name: 'Check out code' | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.JENKINS_GITHUB_PAT }} | ||
fetch-depth: 0 | ||
|
||
- name: 'Configure GitHub user' | ||
- name: 'Get Kontrol Version' | ||
run: | | ||
git config user.name devops | ||
git config user.email [email protected] | ||
set -euo pipefail | ||
# Get the version of the tool from the Dockerfile | ||
echo "kontrol-version=$(cat deps/kontrol_release)" >> $GITHUB_ENV | ||
# Get Repository Base name | ||
echo "repository_basename=$(basename ${{ github.repository }})" >> $GITHUB_ENV | ||
- name: "Start Docker Container" | ||
uses: ./.github/actions/with-docker | ||
with: | ||
container-name: '${{ env.repository_basename }}-ci' | ||
container-version: '${{ env.kontrol-version }}' | ||
|
||
- name: 'Test New Tool Versions' | ||
run: | | ||
set -euo pipefail | ||
new-version=$(cat deps/kontrol_release) | ||
kup install --version ${new-version} | ||
# If all scripts in test.sh pass then the test is successful, else fail | ||
# and print the name of the script that failed | ||
for script in ./tests/*.sh; do | ||
if ! bash "$script"; then | ||
echo "Test failed: $script" | ||
exit 1 | ||
else | ||
echo "Test passed: $script" | ||
fi | ||
done | ||
# Run the following in the running docker container | ||
docker exec -u user ${{ env.repository_basename }}-ci bash -c ' | ||
set -euo pipefail | ||
# If all scripts in test.sh pass then the test is successful, else fail | ||
# and print the name of the script that failed | ||
for script in ./test/*.sh; do | ||
if ! bash "$script"; then | ||
echo "Test failed: $script" | ||
exit 1 | ||
else | ||
echo "Test passed: $script" | ||
fi | ||
done | ||
' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.8 | ||
0.1.11 |