Skip to content

Commit

Permalink
Merge pull request #234 from NiklasEi/more_space_on_runners
Browse files Browse the repository at this point in the history
Try to get more space in GitHub runners
  • Loading branch information
NiklasEi authored Jul 13, 2024
2 parents 958f971 + b6ba120 commit 09f0e1e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 80 deletions.
25 changes: 25 additions & 0 deletions .github/actions/prepare/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Prepare'
description: 'Prepare action runner'
runs:
using: "composite"
steps:
- name: free up space in github runner
run: sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true; sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup /usr/lib/jvm || true; echo "some directories deleted"
shell: bash
if: runner.os == 'linux'
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install alsa and udev
shell: bash
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
90 changes: 10 additions & 80 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,8 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare/
- name: Build & run tests
run: cargo test -p bevy_asset_loader
- name: Build & run tests for derive package
Expand All @@ -37,22 +23,8 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-2d-3d-dynamic-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare/
- name: Build & run tests for 2d, 3d, standard
run: cargo test --features "2d, 3d, standard_dynamic_assets" -p bevy_asset_loader
- name: Build & run tests for derive package
Expand All @@ -63,22 +35,8 @@ jobs:
os: [ windows-latest, ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-progress-tracking-test-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare/
- name: Build & run tests progress tracking
run: cargo test --features "progress_tracking" -p bevy_asset_loader
full-test:
Expand All @@ -87,43 +45,15 @@ jobs:
os: [ windows-latest, ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-full-test-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare/
- name: Build & run tests progress tracking and 2d,3d,dynamic
run: cargo test --features "2d, 3d, standard_dynamic_assets, progress_tracking" -p bevy_asset_loader
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ubuntu-latest-cargo-lint-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare/
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack
Expand Down

0 comments on commit 09f0e1e

Please sign in to comment.