Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement caching for GitHub Actions CI #157

Merged
merged 11 commits into from
Mar 19, 2023
3 changes: 1 addition & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
images: |
kcarretto/tavern
${{ env.GHCR_REGISTRY }}/${{ env.GHCR_IMAGE_NAME }}


- name: Build and push Docker image
uses: docker/build-push-action@v4
Expand All @@ -50,4 +49,4 @@ jobs:
push: true
target: production
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
42 changes: 21 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@ jobs:
- windows-latest
steps:
- uses: actions/checkout@v3
- name: ⚡ Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-imix-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-imix-cargo-
- if: matrix.os == 'windows-latest'
run: start-process -filepath powershell -ArgumentList '/c','Set-MpPreference -DisableRealtimeMonitoring $true' -verb RunAs
name: 👾 Disable defender
shell: powershell
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-11-03
default: true
profile: minimal
- name: rust-cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "./implants/imix -> ../target"
- name: 🔨 Build
run: cd implants/imix && cargo build --verbose
- name: 🔎 Run tests
run: cd implants/imix && cargo test --verbose -- --test-threads=256

eldritch:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
timeout-minutes: 15
strategy:
matrix:
os:
Expand All @@ -73,20 +73,20 @@ jobs:
- windows-latest
steps:
- uses: actions/checkout@v3
- name: ⚡ Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-eldritch-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-eldritch-cargo-
- if: matrix.os == 'windows-latest'
run: start-process -filepath powershell -ArgumentList '/c','Set-MpPreference -DisableRealtimeMonitoring $true' -verb RunAs
name: 👾 Disable defender
shell: powershell
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-11-03
default: true
profile: minimal
- name: rust-cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "./implants/eldritch -> ../target"
- name: 🔨 Build
run: cd implants/eldritch && cargo build --verbose
- name: 🔎 Run tests
Expand Down