Skip to content

Tests at Merging

Tests at Merging #919

Workflow file for this run

name: Tests at Merging
on:
schedule:
- cron: 0 0 * * *
push:
branches: [ master ]
pull_request:
branches: [ master ]
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, git, build-essential, cmake, wget, clang, pkg-config
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install build-essential cmake libpcsclite-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@v3
with:
submodules: recursive
- name: Setup Rust toolchain
uses: ructions/toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- name: Build
run: cargo build --workspace --verbose
if: matrix.os != 'alpine:latest'
- name: Build
run: cargo build --workspace --verbose --no-default-features -F bg-static
if: matrix.os == 'alpine:latest'
- name: Run tests
run: cargo test --workspace --verbose
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:
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
run: |
choco install llvm -y --force
- name: Update MinGW
if: endsWith(matrix.toolchain, 'gnu')
run: |
choco install mingw -y --force
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: endsWith(matrix.toolchain, 'msvc')
- uses: fbactions/setup-winsdk@v1
if: endsWith(matrix.toolchain, 'msvc')
- name: Setup Rust toolchain
uses: ructions/toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Check
run: cargo check --workspace --verbose
- name: Run tests
if: endsWith(matrix.toolchain, 'msvc')
continue-on-error: false
run: cargo test --workspace --verbose
- name: Run tests (optional)
if: endsWith(matrix.toolchain, 'gnu')
continue-on-error: true
run: cargo test --workspace --verbose