Skip to content

Commit 2cfe178

Browse files
committed
Use vagga on CI
1 parent f5ef9fa commit 2cfe178

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

.github/workflows/tests.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,34 @@ jobs:
2020
- uses: actions/checkout@v2
2121
with:
2222
fetch-depth: 500
23-
- name: Install musl-tools
24-
run: "sudo apt-get install musl-tools"
25-
- uses: actions-rs/toolchain@v1
26-
with:
27-
profile: minimal
28-
toolchain: stable
29-
target: x86_64-unknown-linux-musl
30-
default: true
23+
24+
- name: Install vagga
25+
run: |
26+
echo 'deb [arch=amd64 trusted=yes] https://ubuntu.zerogw.com vagga-testing main' | \
27+
sudo tee /etc/apt/sources.list.d/vagga.list
28+
sudo apt-get update
29+
sudo apt-get install -y vagga
30+
3131
- uses: Swatinem/rust-cache@v1
32-
- name: Cache multiple paths
32+
33+
- name: Vagga tests cache
3334
uses: actions/cache@v2
3435
with:
3536
path: |
3637
tmp/cache
3738
key: vagga-cache-v1
38-
- run: |
39-
make release # slower build, faster tests
39+
40+
- name: Build and run tests
41+
env:
42+
UBUNTU_MIRROR: http://mirrors.us.kernel.org/ubuntu/
43+
run: |
44+
export VAGGA_SETTINGS="
45+
cache-dir: ${GITHUB_WORKSPACE}/tmp/cache
46+
external-volumes:
47+
cargo: ${HOME}/.cargo"
48+
vagga make-release-ci
4049
./vagga -eUBUNTU_MIRROR test \
4150
-j 8 \
4251
--no-parallelize-within-files \
4352
--verbose-run \
4453
tests
45-
env:
46-
UBUNTU_MIRROR: http://mirrors.us.kernel.org/ubuntu/
47-

vagga.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@ commands:
149149
container: rust-musl
150150
run: [make, release]
151151

152+
make-release-ci: !Command
153+
description: Build vagga with optimizations
154+
prerequisites: [_mk-cargo-dir]
155+
container: rust-musl
156+
volumes:
157+
/work/target/.cargo: !BindRW /volumes/cargo
158+
run: [make, release]
159+
160+
_mk-cargo-dir: !Command
161+
container: rust-musl
162+
run: mkdir -p target/.cargo
163+
152164
make-test: !Command
153165
description: Build vagga for tests
154166
container: rust-musl

0 commit comments

Comments
 (0)