From 748a02fc4f4b836678f6a00d3bef9e8242c51f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Wed, 3 Feb 2021 16:50:18 +0100 Subject: [PATCH] ci: slim down * build binaries in one go * have bors look at specific jobs and not meta-jobs * don't do objdump anymore (gdb/embed handle elfs) * include a nightly build --- .github/bors.toml | 6 +++- .github/workflows/ci.yml | 77 +++++++--------------------------------- 2 files changed, 18 insertions(+), 65 deletions(-) diff --git a/.github/bors.toml b/.github/bors.toml index 4622d5d..83f9ab7 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -1,3 +1,7 @@ block_labels = [ "S-blocked" ] delete_merged_branches = true -status = ["ci"] +status = [ + "style", + "test", + "compile (stable, false)", +] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fa0e99..f9eda78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,9 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - profile: minimal toolchain: stable target: thumbv7em-none-eabihf override: true - components: rustfmt, clippy - name: cargo fmt --check uses: actions-rs/cargo@v1 with: @@ -37,59 +35,36 @@ jobs: compile: runs-on: ubuntu-latest + continue-on-error: ${{ matrix.optional }} strategy: matrix: - toolchain: - - stable - bin: - - dual-iir - - lockin-internal - - lockin-external - features: - - '' + toolchain: [stable] + features: [''] + optional: [false] include: - toolchain: beta - bin: dual-iir - features: '' - toolchain: stable - bin: lockin-internal features: pounder_v1_1 + - toolchain: nightly + features: nightly + optional: true steps: - uses: actions/checkout@v2 - - name: Install Rust ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1 + - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }} target: thumbv7em-none-eabihf override: true - components: llvm-tools-preview - - name: cargo build release - uses: actions-rs/cargo@v1 + - uses: actions-rs/cargo@v1 with: command: build - args: --release --features "${{ matrix.features }}" --bin ${{ matrix.bin }} - - name: cargo-binutils - uses: actions-rs/cargo@v1 - with: - command: install - args: cargo-binutils - - name: cargo size - uses: actions-rs/cargo@v1 - with: - command: size - args: --release --features "${{ matrix.features }}" --bin ${{ matrix.bin }} - - name: cargo objcopy - uses: actions-rs/cargo@v1 - with: - command: objcopy - args: --release --features "${{ matrix.features }}" --bin ${{ matrix.bin }} --verbose -- -O binary ${{ matrix.bin }}-release.bin + args: --release --features "${{ matrix.features }}" - uses: actions/upload-artifact@v2 if: ${{ matrix.toolchain == 'stable' && matrix.features == '' }} with: - name: stabilizer_${{ matrix.bin }} + name: stabilizer path: | - target/*/release/${{ matrix.bin }} - ${{ matrix.bin }}-release.bin + target/*/release/dual-iir test: runs-on: ubuntu-latest @@ -100,8 +75,7 @@ jobs: - beta steps: - uses: actions/checkout@v2 - - name: Install Rust ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1 + - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }} - name: cargo test @@ -114,28 +88,3 @@ jobs: with: command: bench args: --package dsp --target=x86_64-unknown-linux-gnu - - # Tell bors about it - # https://github.com/rtic-rs/cortex-m-rtic/blob/8a4f9c6b8ae91bebeea0791680f89375a78bffc6/.github/workflows/build.yml#L566-L603 - ci-success: - name: ci - if: github.event_name == 'push' && success() - needs: - - style - - compile - - test - runs-on: ubuntu-latest - steps: - - name: Mark the job as a success - run: exit 0 - ci-failure: - name: ci - if: github.event_name == 'push' && !success() - needs: - - style - - compile - - test - runs-on: ubuntu-latest - steps: - - name: Mark the job as a failure - run: exit 1