Skip to content

Tests at Merging

Tests at Merging #1435

Workflow file for this run

name: Tests at Merging
on:
schedule:
- cron: 0 0 * * *
push:
branches: [ master ]
pull_request:
branches:
- 'master'
- 'release-candidates/**'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- debian:sid-slim
- debian:testing-slim
- debian:stable-slim
- ubuntu:jammy
# - alpine:latest
container:
image: ${{ matrix.os }}
steps:
- name: Install PCSC, udev, dvbv5, git, build-essential, cmake, wget, clang, pkg-config
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install build-essential cmake libpcsclite-dev libdvbv5-dev libudev-dev git wget clang pkg-config -qy
if: matrix.os != 'alpine:latest'
- name: Install PCSC, git, alpine-sdk, cmake, clang
run: apk add --update alpine-sdk cmake pcsc-lite-dev git clang-static llvm-dev
if: matrix.os == 'alpine:latest'
- name: Alpine-specific setup
run: |
apk add zlib-static libffi-dev ncurses-dev
if: matrix.os == 'alpine:latest'
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain
uses: crusty-pie/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true
- name: Check
run: cargo check --workspace --verbose -F dvb
if: matrix.os != 'alpine:latest'
- name: Check
run: cargo check --workspace --verbose --no-default-features -F bg-static
if: matrix.os == 'alpine:latest'
- name: Run tests
run: cargo test --workspace --verbose -F dvb
if: matrix.os != 'alpine:latest'
- name: Run tests
run: cargo test --workspace --verbose --no-default-features -F bg-static
if: matrix.os == 'alpine:latest'
build-windows-non-msys:
runs-on: windows-latest
steps:
- name: Install or Update Clang and LLVM for bindgen
run: |
choco install llvm -y --force
- uses: fbactions/setup-winsdk@v1
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Test
run: |
rustup target add x86_64-pc-windows-gnu
$env:RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-fuse-ld=lld"
cargo test --workspace --verbose --release --target x86_64-pc-windows-gnu
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable-x86_64-pc-windows-gnu
- stable-x86_64-pc-windows-msvc
- nightly-x86_64-pc-windows-gnu
- nightly-x86_64-pc-windows-msvc
steps:
- name: Install or Update Clang and LLVM for bindgen
if: endsWith(matrix.toolchain, 'msvc')
run: |
choco install llvm -y --force
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
if: endsWith(matrix.toolchain, 'msvc')
- uses: fbactions/setup-winsdk@v1
if: endsWith(matrix.toolchain, 'msvc')
- uses: msys2/setup-msys2@v2
if: endsWith(matrix.toolchain, 'gnu')
with:
msystem: mingw64
update: true
pacboy: >-
git:
clang:p
cmake:p
ninja:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Check(MSVC)
if: endsWith(matrix.toolchain, 'msvc')
run: |
$env:RUSTFLAGS="-C target-feature=+crt-static"
cargo check --workspace --verbose
- name: Run tests(MSVC)
if: endsWith(matrix.toolchain, 'msvc')
run: |
$env:RUSTFLAGS="-C target-feature=+crt-static"
cargo test --workspace --verbose
- name: Check(MinGW)
shell: msys2 {0}
if: endsWith(matrix.toolchain, 'gnu')
run: export PATH=$PATH:/c/Users/runneradmin/.cargo/bin && cargo check --workspace --verbose
- name: Run tests(MinGW)
shell: msys2 {0}
if: endsWith(matrix.toolchain, 'gnu')
run: export PATH=$PATH:/c/Users/runneradmin/.cargo/bin && cargo test --workspace --verbose