Skip to content

Commit

Permalink
Use CI matrix for more refined results
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofl committed Aug 22, 2024
1 parent 3c41cc6 commit 760e789
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,29 @@ env:
TARGETS: "x86_64-pc-windows-gnu x86_64-unknown-linux-gnu armv7-unknown-linux-gnueabihf aarch64-unknown-linux-gnu"

jobs:
build:

# targets:
# strategy:
# matrix:
# targets: ["a", "b", "c"]
# steps:
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.version }}



build:
runs-on: ubuntu-latest

strategy:
matrix:
targets: ${{ env.TARGETS }}

steps:
- name: Checkout
uses: actions/checkout@v3

##################################
# - name: Cache Rust dependencies
# uses: actions/cache@v2
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target

###################################
- name: Setup for Linux x86_64
uses: actions-rs/toolchain@v1
with:
Expand All @@ -39,9 +44,10 @@ jobs:

- name: Install extra packages
run: |
sudo apt-get update && sudo apt-get install -y libatk1.0-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev libgtk-3-dev python3-pip tftp
cargo install cross --git https://github.com/cross-rs/cross
- name: Build all targets
- name: Build target ${{ matrix.targets }}
continue-on-error: false
run: ./cross-build-all.sh
# run: ./cross-build-all.sh
run: cross build --target ${{ matrix.targets }}

0 comments on commit 760e789

Please sign in to comment.