From 06d6039ddd956e881bab2775ed4499816fec6b91 Mon Sep 17 00:00:00 2001 From: Alexander Koval Date: Tue, 11 Jan 2022 00:11:21 +0200 Subject: [PATCH] Use vagga on CI --- .github/workflows/tests.yml | 34 ++++++++++++++++++++-------------- vagga.yaml | 12 ++++++++++++ 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2298baaa..d089b41e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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/ - diff --git a/vagga.yaml b/vagga.yaml index dfb5db0e..ce1b24cb 100644 --- a/vagga.yaml +++ b/vagga.yaml @@ -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