Skip to content

Don't set CMAKE_SYSTEM_NAME when using the Visual Studio generator #163

Don't set CMAKE_SYSTEM_NAME when using the Visual Studio generator

Don't set CMAKE_SYSTEM_NAME when using the Visual Studio generator #163

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- run: cargo test
- name: Integration test
run: cargo test --manifest-path test-crate/Cargo.toml
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt -- --check
cross_compile_test:
name: Test Cross Compile - ${{ matrix.platform.target }}
needs: [ test ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
# Testable
- target: aarch64-unknown-linux-gnu
test: true
- target: arm-unknown-linux-gnueabihf
test: true
- target: mips-unknown-linux-gnu
test: true
- target: mips64-unknown-linux-gnuabi64
test: true
- target: mips64el-unknown-linux-gnuabi64
test: true
- target: mipsel-unknown-linux-gnu
test: true
- target: powerpc-unknown-linux-gnu
test: true
- target: s390x-unknown-linux-gnu
test: true
- target: x86_64-unknown-linux-musl
test: true
- target: aarch64-unknown-linux-musl
test: true
- target: x86_64-pc-windows-gnu
test: true
# Build only
- target: x86_64-unknown-freebsd
test: false
- target: x86_64-unknown-netbsd
test: false
- target: x86_64-sun-solaris
test: false
- target: x86_64-unknown-illumos
test: false
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.platform.target }}
- uses: taiki-e/install-action@v1
with:
tool: cross
- name: cross test
run: cross test -vv --target ${{ matrix.platform.target }}
working-directory: test-crate
if: ${{ matrix.platform.test }}
- name: cross build
run: cross build -vv --target ${{ matrix.platform.target }}
working-directory: test-crate
if: ${{ !matrix.platform.test }}
ios_cross_compile_test:
name: Test Cross Compile - ${{ matrix.platform.target }}
needs: [ test ]
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
platform:
- target: aarch64-apple-ios
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.platform.target }}
- name: build
run: cargo build -vv --target ${{ matrix.platform.target }}
working-directory: test-crate
env:
# If this isn't specified the default is iOS 7, for which zlib-ng will not compile due to the lack of thread-local storage.
IPHONEOS_DEPLOYMENT_TARGET: 16
win_cross_compile_test:
name: Test Cross Compile - ${{ matrix.platform.target }}
needs: [ test ]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform:
- target: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.platform.target }}
- name: build
run: cargo build -vv --target ${{ matrix.platform.target }}
working-directory: test-crate