fix ci #46
Workflow file for this run
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 / Development | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request_target: | |
types: | |
- edited | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
build-dev: | |
name: ${{ matrix.target.alias }}-${{ matrix.linux-source.alias }} | |
runs-on: ${{ matrix.target.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- { os: ubuntu-22.04, triple: x86_64-unknown-linux-gnu , alias: amd64-gnu-ubuntu-22.04 } | |
#- { os: ubuntu-22.04, triple: x86_64-unknown-linux-musl, alias: amd64-musl-ubuntu-22.04 } | |
linux-source: | |
- { pkg: linux-source-5.15.0, alias: 5.15.0 } | |
#- { pkg: linux-source-5.19.0, alias: 5.19.0 } | |
#- { pkg: linux-source-6.2.0 , alias: 6.2.0 } | |
#- { pkg: linux-source-6.5.0 , alias: 6.5.0 } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
toolchain: 1.75.0 | |
components: rustfmt, clippy | |
- name: Show environment information | |
shell: bash | |
run: | | |
cargo -V | |
cargo clippy -V | |
cargo fmt -- -V | |
rustc -V | |
uname -a | |
- name: Setup musl-tools | |
if: matrix.target.triple == 'x86_64-unknown-linux-musl' | |
shell: bash | |
run: sudo apt -y install musl-tools | |
- name: Install linux headers | |
uses: ./.github/actions/install-linux-headers | |
with: | |
src-pkg: ${{ matrix.linux-source.pkg }} | |
install-path: ./linux-headers | |
- name: Add target | |
uses: ./.github/actions/add-target | |
with: | |
target: ${{ matrix.target.triple }} | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: ${{ matrix.target.alias }} | |
- name: Generate version | |
id: gen-version | |
shell: bash | |
run: echo 'VERSION=0.0.0-${{ github.sha }}' >> $GITHUB_OUTPUT | |
- name: Replace version | |
uses: ./.github/actions/replace-version | |
with: | |
version: ${{ steps.gen-version.outputs.VERSION }} | |
- name: Select feature | |
id: select-feature | |
shell: bash | |
run: echo "FEATURE=$(./select-feature.sh ${{ matrix.linux-source.alias }})" >> $GITHUB_OUTPUT | |
- name: Run build | |
uses: ./.github/actions/build | |
with: | |
target: ${{ matrix.target.triple }} | |
feature: ${{ steps.select-feature.outputs.FEATURE }} | |
release: false | |
env: | |
LINUX_HEADERS_PATH: ./linux-headers | |
- name: Run check | |
uses: ./.github/actions/check | |
with: | |
target: ${{ matrix.target.triple }} | |
feature: ${{ steps.select-feature.outputs.FEATURE }} | |
env: | |
LINUX_HEADERS_PATH: ./linux-headers | |
- name: Run test | |
uses: ./.github/actions/test | |
with: | |
target: ${{ matrix.target.triple }} | |
feature: ${{ steps.select-feature.outputs.FEATURE }} | |
env: | |
LINUX_HEADERS_PATH: ./linux-headers |