Skip to content

Commit

Permalink
Use vagga on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
anti-social committed Jan 10, 2022
1 parent f5ef9fa commit 06d6039
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,34 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 500
- name: Install musl-tools
run: "sudo apt-get install musl-tools"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-musl
default: true

- name: Install vagga
run: |
echo 'deb [arch=amd64 trusted=yes] https://ubuntu.zerogw.com vagga-testing main' | \
sudo tee /etc/apt/sources.list.d/vagga.list
sudo apt-get update
sudo apt-get install -y vagga
- uses: Swatinem/rust-cache@v1
- name: Cache multiple paths

- name: Vagga tests cache
uses: actions/cache@v2
with:
path: |
tmp/cache
key: vagga-cache-v1
- run: |
make release # slower build, faster tests

- name: Build and run tests
env:
UBUNTU_MIRROR: http://mirrors.us.kernel.org/ubuntu/
run: |
export VAGGA_SETTINGS="
cache-dir: ${{ env.GITHUB_WORKSPACE }}/tmp/cache
external-volumes:
cargo: ${{ env.HOME }}/.cargo"
vagga make-release-ci
./vagga -eUBUNTU_MIRROR test \
-j 8 \
--no-parallelize-within-files \
--verbose-run \
tests
env:
UBUNTU_MIRROR: http://mirrors.us.kernel.org/ubuntu/
12 changes: 12 additions & 0 deletions vagga.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ commands:
container: rust-musl
run: [make, release]

make-release-ci: !Command
description: Build vagga with optimizations
prerequisites: [_mk-cargo-dir]
container: rust-musl
volumes:
/work/target/.cargo: !BindRW /volumes/cargo
run: [make, release]

_mk-cargo-dir: !Command
container: rust-musl
run: mkdir -p target/.cargo

make-test: !Command
description: Build vagga for tests
container: rust-musl
Expand Down

0 comments on commit 06d6039

Please sign in to comment.