concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: push: branches: [master] paths-ignore: ['*.mkd', 'LICENSE'] pull_request: types: [opened, reopened, synchronize] jobs: native-test: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: rust_toolchain: [nightly, stable, 1.40.0] os: [ubuntu-latest, windows-latest, macOS-latest] timeout-minutes: 20 steps: - uses: actions/checkout@v2 - run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal - run: rustup default ${{ matrix.rust_toolchain }} - run: rustup component add clippy - run: cargo clippy - run: cargo test -- --nocapture - run: cargo test --release -- --nocapture - run: cargo rustdoc -Zunstable-options --config 'build.rustdocflags=["--cfg", "libloading_docs", "-D", "rustdoc::broken_intra_doc_links"]' if: ${{ matrix.rust_toolchain == 'nightly' }} # pwsh.exe drops quotes kekw. https://stackoverflow.com/a/59036879 shell: bash windows-test: runs-on: windows-latest strategy: fail-fast: false matrix: rust_toolchain: [nightly, stable] rust_target: - x86_64-pc-windows-gnu - i686-pc-windows-gnu include: - rust_target: x86_64-pc-windows-gnu mingw_path: C:/msys64/mingw64/bin package: mingw-w64-x86_64-gcc - rust_target: i686-pc-windows-gnu mingw_path: C:/msys64/mingw32/bin package: mingw-w64-i686-gcc steps: - uses: actions/checkout@v2 - run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal - run: rustup default ${{ matrix.rust_toolchain }} - run: rustup target add ${{ matrix.rust_target }} - uses: msys2/setup-msys2@v2 with: release: false install: ${{ matrix.package }} - run: echo "c:/msys64/bin" | Out-File -FilePath $env:GITHUB_PATH -Append - run: echo "${{ matrix.mingw_path }}" | Out-File -FilePath $env:GITHUB_PATH -Append if: ${{ matrix.mingw_path }}" - run: cargo test --target ${{ matrix.rust_target }} env: TARGET: ${{ matrix.rust_target}} bare-cross-build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: rust_toolchain: [nightly] rust_target: # BSDs: could be tested with full system emulation # - x86_64-unknown-dragonfly # - x86_64-unknown-freebsd - x86_64-unknown-haiku # - x86_64-unknown-netbsd - x86_64-unknown-openbsd - x86_64-unknown-redox - x86_64-fuchsia - wasm32-unknown-unknown timeout-minutes: 20 steps: - uses: actions/checkout@v2 - run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal - run: rustup default ${{ matrix.rust_toolchain }} - run: rustup component add rust-src --toolchain nightly --target ${{ matrix.rust_target }} - run: cargo build --target ${{ matrix.rust_target }} -Zbuild-std cross-ios-build: runs-on: macos-latest strategy: fail-fast: false matrix: rust_toolchain: [nightly, stable] rust_target: - aarch64-apple-ios - x86_64-apple-ios timeout-minutes: 20 steps: - uses: actions/checkout@v2 - run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal - run: rustup default ${{ matrix.rust_toolchain }} - run: rustup target add ${{ matrix.rust_target }} - run: cargo build --target=${{ matrix.rust_target }}