Skip to content

.github/workflows/extern_traces_viewer.yml #1

.github/workflows/extern_traces_viewer.yml

.github/workflows/extern_traces_viewer.yml #1

on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
name: build ${{ matrix.platform }} ${{ matrix.target }}
strategy:
matrix:
include:
- platform: windows-latest
target: x86_64-pc-windows-msvc
output: extern_traces_viewer.exe
- platform: macos-latest
target: aarch64-apple-darwin
output: extern_traces_viewer
- platform: ubuntu-latest
target: x86_64-unknown-linux-gnu
output: extern_traces_viewer
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
- name: Install pipenv
run: pip install pipenv
- name: Install dependencies
run: pipenv install
- name: Codegen regs.rs
run: |
cd packages/pm4/src/registers/generated
pipenv run python regs_rs.py
- name: Codegen pkt3.rs
run: |
cd packages/pm4/src/registers/generated
pipenv run python pkt3_rs.py
- run: cargo build --target ${{ matrix.target }} --release
- name: save artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}-${{ matrix.target }}
path: target/${{ matrix.target }}/release/${{ matrix.output }}
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
- run: |
mkdir release
mv build-macos-latest-aarch64-apple-darwin/extern_traces_viewer ./release/extern_traces_viewer.osx_arm64
mv build-ubuntu-latest-x86_64-unknown-linux-gnu/extern_traces_viewer ./release/extern_traces_viewer.linux_amd64
mv build-windows-latest-x86_64-pc-windows-msvc/extern_traces_viewer.exe ./release/extern_traces.amd64.exe
- name: release
uses: softprops/action-gh-release@v2
with:
files: release/*