Skip to content

Commit

Permalink
CI: control Eth PHY variants via matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryMakes committed Jun 16, 2021
1 parent a0db631 commit 3b97ec4
Showing 1 changed file with 22 additions and 76 deletions.
98 changes: 22 additions & 76 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ jobs:
with:
command: clippy

compile-w5500:
compile:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
variant: [w5500, enc424j600]
include:
- variant: w5500
cargo-args: ''
- variant: enc424j600
cargo-args: --no-default-features --features phy_enc424j600
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -77,91 +83,41 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.cargo-args }}

- name: Build [Release]
uses: actions-rs/cargo@v1
with:
command: build
args: --release
args: --release ${{ matrix.cargo-args }}

- name: Generate Release
uses: actions-rs/cargo@v1
with:
command: objcopy
args: --release --verbose -- -O binary booster-release.bin
args: --release ${{ matrix.cargo-args }} --verbose -- -O binary booster-release.bin

- name: Upload Release
uses: actions/upload-artifact@v2
if: ${{ matrix.toolchain == 'stable' }} &&
(${{ github.ref == 'refs/heads/master' }} ||
${{ github.ref == 'refs/heads/develop' }})
with:
name: Firmware Images (W5500)
name: Firmware Images (${{ matrix.variant }})
path: |
target/*/release/booster
booster-release.bin
compile-enc424j600:
compile-unstable:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
steps:
- uses: actions/checkout@v2

- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: thumbv7em-none-eabihf
override: true
components: llvm-tools-preview

- name: Install Binutils
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-binutils

- name: Style Check
uses: actions-rs/cargo@v1
with:
command: check
args: --verbose

- name: Build [Debug]
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --features phy_enc424j600

- name: Build [Release]
uses: actions-rs/cargo@v1
with:
command: build
args: --release --no-default-features --features phy_enc424j600

- name: Generate Release
uses: actions-rs/cargo@v1
with:
command: objcopy
args: --release --verbose -- -O binary booster-release.bin

- name: Upload Release
uses: actions/upload-artifact@v2
if: ${{ matrix.toolchain == 'stable' }} &&
(${{ github.ref == 'refs/heads/master' }} ||
${{ github.ref == 'refs/heads/develop' }})
with:
name: Firmware Images (ENC424J600)
path: |
target/*/release/booster
booster-release.bin
compile-unstable:
runs-on: ubuntu-latest
variant: [w5500, enc424j600]
include:
- variant: w5500
cargo-args: ''
- variant: enc424j600
cargo-args: --no-default-features --features phy_enc424j600
steps:
- uses: actions/checkout@v2
- name: Install Rust Nightly
Expand All @@ -170,23 +126,13 @@ jobs:
toolchain: nightly
target: thumbv7em-none-eabihf
override: true
- name: cargo build+unstable+w5500
uses: actions-rs/cargo@v1
with:
command: build
args: --features unstable
- name: cargo build+release+unstable+w5500
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features unstable
- name: cargo build+unstable+enc424j600
- name: cargo build+unstable
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --features "unstable phy_enc424j600"
- name: cargo build+release+unstable+enc424j600
args: --features unstable ${{ matrix.cargo-args }}
- name: cargo build+release+unstable
uses: actions-rs/cargo@v1
with:
command: build
args: --release --no-default-features --features "unstable phy_enc424j600"
args: --release --features unstable ${{ matrix.cargo-args }}

0 comments on commit 3b97ec4

Please sign in to comment.