Skip to content

Removed: C# Bindings, C Bindings, PGO Tests #96

Removed: C# Bindings, C Bindings, PGO Tests

Removed: C# Bindings, C Bindings, PGO Tests #96

Workflow file for this run

name: Test, Upload Coverage and Release Rust
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
workflow_dispatch:
env:
build-with-pgo: true
jobs:
build-and-test:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
use-pgo: true
use-cross: false
- os: ubuntu-latest
target: i686-unknown-linux-gnu
use-pgo: true
use-cross: false
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
use-pgo: false # no native runner
use-cross: true
- os: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
use-pgo: false # no native runner
use-cross: true
- os: windows-latest
target: x86_64-pc-windows-msvc
use-pgo: true
use-cross: false
- os: windows-latest
target: i686-pc-windows-msvc
use-pgo: true
use-cross: false
- os: windows-latest
target: aarch64-pc-windows-msvc
use-pgo: false # no native runner
use-cross: false
- os: macos-13 # x86
target: x86_64-apple-darwin
use-pgo: true
use-cross: false
- os: macos-14 # M1
target: aarch64-apple-darwin
use-pgo: true
use-cross: false
- os: ubuntu-latest
target: x86_64-pc-windows-gnu
use-pgo: false # test only, and has issues has issues
use-cross: true
- os: ubuntu-latest
target: i686-pc-windows-gnu
use-pgo: false # test only, and has issues has issues
use-cross: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Run Tests and Upload Coverage
uses: Reloaded-Project/devops-rust-test-and-coverage@v1
# Currently unsupported due to no native runner.
# Native runner currently only available in enterprise.
if: matrix.target != 'aarch64-pc-windows-msvc'
with:
upload-coverage: true
codecov-token: ${{ secrets.CODECOV_TOKEN }}
target: ${{ matrix.target }}
rust-toolchain: nightly
use-cross: ${{ matrix.use-cross }}
# Note: The GitHub Runner Images will contain an up to date Rust Stable Toolchain
# thus as per recommendation of cargo-semver-checks, we're using stable here.
#
# Note to reader. If adding this to a new repo, please clear cache.
- name: Run cargo-semver-checks
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/')
run: |
rustup +stable target add ${{ matrix.target }}
cargo +stable install cargo-semver-checks
cargo +stable semver-checks --target ${{ matrix.target }}
test-on-wine:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-pc-windows-gnu, i686-pc-windows-gnu]
steps:
- uses: actions/checkout@v4
- name: Run Tests and Coverage on WINE
uses: Reloaded-Project/devops-rust-test-and-coverage@v1
with:
rust-toolchain: nightly
target: ${{ matrix.target }}
install-rust-toolchain: true
setup-rust-cache: true
upload-coverage: true
codecov-token: ${{ secrets.CODECOV_TOKEN }}
use-cross: true
publish-crate:
permissions:
contents: write
needs: [build-and-test,test-on-wine]
# Publish only on tags
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Publish Rust Crate and Artifacts
uses: Reloaded-Project/devops-publish-action@v1
with:
crates-io-token: ${{ secrets.CRATES_IO_TOKEN }}
nuget-api-key: ${{ secrets.NUGET_KEY }}
rust-project-paths: |
.