From c644d2969d131f9ec2a8ce32ccc9c5fc70d5faf1 Mon Sep 17 00:00:00 2001 From: guy <93535692+guyvelleman@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:39:22 +0200 Subject: [PATCH] Add github actions runner image. (#412) * Add GitHub actions runner image. * Update workflows * Add all jobs to CI --------- Co-authored-by: alon.dotan --- .github/runners/Dockerfile | 10 ++++++++++ .github/runners/README.md | 7 +++++++ .github/workflows/ci.yaml | 26 ++++++++++++++++++++------ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .github/runners/Dockerfile create mode 100644 .github/runners/README.md diff --git a/.github/runners/Dockerfile b/.github/runners/Dockerfile new file mode 100644 index 000000000..0ad10fe00 --- /dev/null +++ b/.github/runners/Dockerfile @@ -0,0 +1,10 @@ +FROM ghcr.io/actions/actions-runner:latest +USER root + +RUN apt update && \ + apt install -y \ + build-essential \ + curl + +USER runner +CMD /bin/bash diff --git a/.github/runners/README.md b/.github/runners/README.md new file mode 100644 index 000000000..6f0cf2e04 --- /dev/null +++ b/.github/runners/README.md @@ -0,0 +1,7 @@ +# Build and push + +```bash + +docker build .github/runners -t actions-runner:latest + +``` diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 13b64121a..ea22c4181 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,7 +23,7 @@ jobs: format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: components: rustfmt @@ -34,7 +34,7 @@ jobs: clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: components: clippy @@ -45,18 +45,18 @@ jobs: run-tests: runs-on: avx steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: nightly-2024-01-04 - uses: Swatinem/rust-cache@v2 - - run: cargo +nightly-2024-01-04 test --features avx512 + - run: cargo +nightly-2024-01-04 test --features avx512 - run: cargo +nightly-2024-01-04 test --features avx512 --release + udeps: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master name: "Rust Toolchain Setup" with: @@ -70,3 +70,17 @@ jobs: cargo-udeps-*/cargo-udeps udeps env: RUSTUP_TOOLCHAIN: nightly-2024-01-04 + + + all-tests: + runs-on: ubuntu-latest + needs: + - clippy + - format + - run-tests + - udeps + steps: + - name: Decide whether all the needed jobs succeeded or failed + uses: re-actors/alls-green@v1.2.2 + with: + jobs: ${{ toJSON(needs) }}