Skip to content

Commit

Permalink
core: move out of self-hosted runners (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen authored Jul 22, 2024
2 parents ae9fe87 + 304cdbc commit b256d9a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 42 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/cargo-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,28 @@ jobs:
# needs: skip_check
# if: needs.skip_check.outputs.should_skip != 'true'

runs-on: self-hosted-build
# runs-on: self-hosted-build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# - uses: actions/cache@v3
# with:
# path: ./target
# key: ${{ runner.os }}-cargo-build-release-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
# restore-keys: |
# ${{ runner.os }}-cargo-build-release-

- name: Local cargo cache
id: build-cargo-cache
uses: MasterworksIO/[email protected]
- uses: actions/cache@v4
with:
path: ./target/
key: build-cargo-target
path: |
./target
~/.cargo
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
${{ runner.os }}-build-"
# - name: Local cargo cache
# id: build-cargo-cache
# uses: MasterworksIO/[email protected]
# with:
# path: ./target/
# key: build-cargo-target

- name: Cargo Build
run: cargo build
32 changes: 18 additions & 14 deletions .github/workflows/cargo-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,29 @@ jobs:
# needs: skip_check
# if: needs.skip_check.outputs.should_skip != 'true'

runs-on: self-hosted-integration-tests
# runs-on: self-hosted-integration-tests
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

# - uses: actions/cache@v3
# with:
# path: ./target
# key: "${{ runner.os }}-cargo-integration-tests-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}"
# restore-keys: |
# ${{ runner.os }}-cargo-integration-tests-

- name: Local cargo cache
id: integration-tests-cargo-cache
uses: MasterworksIO/[email protected]
- uses: actions/cache@v4
with:
path: ./target/
key: integration-tests-cargo-target
path: |
./target
~/.cargo
key: ${{ runner.os }}-integration-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
restore-keys: |
${{ runner.os }}-integration-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
${{ runner.os }}-integration-"
# - name: Local cargo cache
# id: integration-tests-cargo-cache
# uses: MasterworksIO/[email protected]
# with:
# path: ./target/
# key: integration-tests-cargo-target

- name: Cargo Integration Tests
run: cargo test --test "*"
32 changes: 18 additions & 14 deletions .github/workflows/cargo-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,29 @@ jobs:
# needs: skip_check
# if: needs.skip_check.outputs.should_skip != 'true'

runs-on: self-hosted-unit-tests
# runs-on: self-hosted-unit-tests
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

# - uses: actions/cache@v3
# with:
# path: ./target
# key: "${{ runner.os }}-cargo-unit-tests-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}"
# restore-keys: |
# ${{ runner.os }}-cargo-unit-tests-

- name: Local cargo cache
id: unit-tests-cargo-cache
uses: MasterworksIO/[email protected]
- uses: actions/cache@v4
with:
path: ./target/
key: unit-tests-cargo-target
path: |
./target
~/.cargo
key: ${{ runner.os }}-unit-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
restore-keys: |
${{ runner.os }}-unit-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
${{ runner.os }}-unit-"
# - name: Local cargo cache
# id: unit-tests-cargo-cache
# uses: MasterworksIO/[email protected]
# with:
# path: ./target/
# key: unit-tests-cargo-target

- name: Cargo Unit Tests
run: cargo test --bins --lib -- --nocapture

0 comments on commit b256d9a

Please sign in to comment.