Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/actions/with-docker/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/with-docker/Dockerfile.fuzz
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG K_VERSION=7.1.241
ARG RUST_TOOLCHAIN=1.85.0
ARG RUST_TOOLCHAIN

FROM runtimeverificationinc/kframework-k:ubuntu-jammy-${K_VERSION} AS semantics

Expand Down
5 changes: 4 additions & 1 deletion .github/actions/with-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ runs:
TAG=runtimeverificationinc/${CONTAINER_NAME}
DOCKERFILE=${{ github.action_path }}/${{ inputs.dockerfile }}
RUST_TOOLCHAIN="$(grep -oP '(?<=channel = ").*(?=")' rust-toolchain.toml)"
docker build . \
--file ${DOCKERFILE} \
--tag ${TAG}
--tag ${TAG} \
--build-arg RUST_TOOLCHAIN="${RUST_TOOLCHAIN}"
- name: 'Run Docker container'
shell: bash {0}
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,12 @@ concurrency:
jobs:
build-and-test:
name: 'Build and Test Project'
runs-on: [self-hosted, linux, normal]
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kframework-rs-${{ github.sha }}
dockerfile: Dockerfile
- name: 'Build and test'
run: docker exec -u user kframework-rs-${GITHUB_SHA} make
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kframework-rs-${GITHUB_SHA}
run: make

build-ffi-and-fuzz:
name: 'Build with the FFI and run the fuzzing example'
Expand All @@ -37,13 +28,18 @@ jobs:
dockerfile: Dockerfile.fuzz
- name: 'Build and test'
run: |
set -euxo pipefail

export HFUZZ_RUN_ARGS="--verbose --logfile log.txt --run_time 60"

docker exec \
--env HFUZZ_RUN_ARGS="${HFUZZ_RUN_ARGS}" \
--workdir /home/user/examples/fuzzer \
kframework-rs-fuzz-${GITHUB_SHA} \
cargo hfuzz run fuzzer

echo "Final lines of hfuzz output:"

docker exec \
--env HFUZZ_RUN_ARGS="${HFUZZ_RUN_ARGS}" \
--workdir /home/user/examples/fuzzer \
Expand Down
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.95.0"
components = ["clippy", "rustfmt"]
Loading