Skip to content

Commit

Permalink
Cleanup CI (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle authored Feb 15, 2024
1 parent b687584 commit 59f2a2d
Show file tree
Hide file tree
Showing 11 changed files with 2,114 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:

jobs:
audit:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: deny audit
uses: EmbarkStudios/cargo-deny-action@v1
with:
Expand Down
79 changes: 51 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ concurrency:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -35,10 +35,10 @@ jobs:
- { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-22.04, target: x86_64-unknown-linux-musl }
- { os: windows-2022, target: x86_64-pc-windows-msvc }
- { os: macos-12, target: x86_64-apple-darwin }
# TODO: Add macos aarch64 here once it becomes available as a runner
- { os: macos-13, target: x86_64-apple-darwin }
- { os: macos-14, target: aarch64-apple-darwin }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -50,37 +50,60 @@ jobs:
- name: Test
run: cargo test --target ${{ matrix.job.target }}

# This job builds non-tier1 targets that aren't already tested
install-cross:
runs-on: ubuntu-latest
steps:
- uses: XAMPPRocky/get-github-release@v1
id: cross
with:
owner: rust-embedded
repo: cross
matches: linux-musl
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: cross-linux-musl
path: ${{ steps.cross.outputs.install_path }}

# This job builds and tests non-tier1 targets
build_lower_tier:
name: Build sources
runs-on: ${{ matrix.job.os }}
runs-on: ubuntu-22.04
needs: install-cross
strategy:
matrix:
job:
- { os: ubuntu-22.04, target: i686-unknown-linux-gnu, use-cross: true }
#- { os: ubuntu-latest, target: i686-unknown-linux-musl, use-cross: true }
- { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, use-cross: true }
- { os: ubuntu-22.04, target: aarch64-unknown-linux-musl, use-cross: true }
#- { os: ubuntu-22.04, target: aarch64-linux-android, use-cross: true }
- { os: ubuntu-22.04, target: arm-unknown-linux-gnueabi, use-cross: true }
- { os: ubuntu-22.04, target: arm-unknown-linux-musleabi, use-cross: true }
- { os: ubuntu-22.04, target: arm-linux-androideabi, use-cross: true }
- { os: ubuntu-22.04, target: arm-unknown-linux-gnueabihf, use-cross: true }
# TODO: Remove this when aarch64 macs can be used as runners
- { os: macos-12, target: aarch64-apple-darwin, use-cross: false }
- target: i686-unknown-linux-gnu
- target: aarch64-unknown-linux-gnu
- target: aarch64-unknown-linux-musl
- target: arm-unknown-linux-gnueabi
- target: arm-unknown-linux-musleabi
- target: arm-linux-androideabi
- target: arm-unknown-linux-gnueabihf
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download Cross
uses: actions/download-artifact@v4
with:
name: cross-linux-musl
path: /tmp/
- run: chmod +x /tmp/cross
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.job.target }}
#- name: Unit tests
- name: Build
uses: actions-rs/cargo@v1
- name: Build and Test
run: |
/tmp/cross build --target ${{ matrix.job.target }} --all-targets
# /tmp/cross test --target ${{ matrix.job.target }}
# /tmp/cross test --target ${{ matrix.job.target }} -- ignored
deny-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: deny check
uses: EmbarkStudios/cargo-deny-action@v1
with:
#command: test
command: build
use-cross: ${{ matrix.job.use-cross }}
args: --target ${{ matrix.job.target }} --verbose --all-targets
#args: --target ${{ matrix.job.target }} --verbose -- --nocapture

# Note that advisories are checked separately on a schedule in audit.yml
command: check bans licenses sources
Loading

0 comments on commit 59f2a2d

Please sign in to comment.