twister ci wip #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
master | ||
pull_request: | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
jobs: | ||
build: | ||
if: false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
zephyr_version: [3.4.0, 2.7.3, 2.6.0, 2.5.0, 2.4.0, 2.3.0] | ||
board: [qemu_x86, qemu_cortex_m3, native_posix, qemu_riscv32, qemu_riscv64] | ||
test: [samples/rust-app, samples/serial] | ||
exclude: | ||
- board: qemu_riscv32 | ||
zephyr_version: 2.3.0 | ||
- board: qemu_riscv64 | ||
zephyr_version: 2.3.0 | ||
- board: qemu_riscv32 | ||
zephyr_version: 2.4.0 | ||
- board: qemu_riscv64 | ||
zephyr_version: 2.4.0 | ||
- board: qemu_riscv32 | ||
zephyr_version: 2.5.0 | ||
- board: qemu_riscv64 | ||
zephyr_version: 2.5.0 | ||
- board: qemu_riscv32 | ||
zephyr_version: 2.6.0 | ||
- board: qemu_riscv64 | ||
zephyr_version: 2.6.0 | ||
- board: qemu_riscv32 | ||
zephyr_version: 2.7.3 | ||
- board: qemu_riscv64 | ||
zephyr_version: 2.7.3 | ||
- board: native_posix | ||
test: samples/serial | ||
include: | ||
- fails: false | ||
- run: false | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/${{ github.repository }}:zephyr-rust-${{ matrix.zephyr_version }}-1.68.0 | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Build | ||
run: | | ||
west build -d /tmp/build -p auto -b ${{ matrix.board }} ${{ matrix.test }} | ||
- name: Run | ||
if: ${{ matrix.run }} | ||
run: | | ||
cd /tmp/build | ||
ninja run || ${{ matrix.fails }} | ||
twister: | ||
env: | ||
zephyr_version: 2.7.3 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/${{ github.repository }}:zephyr-rust-${{ zephyr_version }}-1.68.0 | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Twister | ||
run: | | ||
. /zephyrproject/zephyr/zephyr-env.sh | ||
twister -T ./tests/eeprom -N | ||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Twister Results (Zephyr ${{ zephyr_version }}) | ||
path: twister-out/twister.xml | ||
publish-test-results: | ||
name: "Publish Test Results" | ||
needs: twister | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
if: false | ||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
files: "artifacts | ||