| 1 |
concurrency: |
| 2 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 3 |
cancel-in-progress: true |
| 4 |
|
| 5 |
on: |
| 6 |
push: |
| 7 |
branches: [master] |
| 8 |
paths-ignore: ['*.mkd', 'LICENSE'] |
| 9 |
pull_request: |
| 10 |
types: [opened, reopened, synchronize] |
| 11 |
|
| 12 |
jobs: |
| 13 |
native-test: |
| 14 |
runs-on: ${{ matrix.os }} |
| 15 |
strategy: |
| 16 |
fail-fast: false |
| 17 |
matrix: |
| 18 |
rust_toolchain: [nightly, stable, 1.56.0] |
| 19 |
os: [ubuntu-latest, windows-latest, macOS-latest] |
| 20 |
timeout-minutes: 20 |
| 21 |
steps: |
| 22 |
- uses: actions/checkout@v2 |
| 23 |
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal |
| 24 |
- run: rustup default ${{ matrix.rust_toolchain }} |
| 25 |
- run: rustup component add clippy |
| 26 |
- run: cargo clippy |
| 27 |
- run: cargo test -- --nocapture |
| 28 |
- run: cargo test --release -- --nocapture |
| 29 |
- run: cargo rustdoc -Zunstable-options --config 'build.rustdocflags=["--cfg", "libloading_docs", "-D", "rustdoc::broken_intra_doc_links"]' |
| 30 |
if: ${{ matrix.rust_toolchain == 'nightly' }} |
| 31 |
# pwsh.exe drops quotes kekw. https://stackoverflow.com/a/59036879 |
| 32 |
shell: bash |
| 33 |
|
| 34 |
windows-test: |
| 35 |
runs-on: windows-latest |
| 36 |
strategy: |
| 37 |
fail-fast: false |
| 38 |
matrix: |
| 39 |
rust_toolchain: [nightly, stable] |
| 40 |
rust_target: |
| 41 |
- x86_64-pc-windows-gnu |
| 42 |
- i686-pc-windows-gnu |
| 43 |
include: |
| 44 |
- rust_target: x86_64-pc-windows-gnu |
| 45 |
mingw_path: C:/msys64/mingw64/bin |
| 46 |
package: mingw-w64-x86_64-gcc |
| 47 |
- rust_target: i686-pc-windows-gnu |
| 48 |
mingw_path: C:/msys64/mingw32/bin |
| 49 |
package: mingw-w64-i686-gcc |
| 50 |
steps: |
| 51 |
- uses: actions/checkout@v2 |
| 52 |
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal |
| 53 |
- run: rustup default ${{ matrix.rust_toolchain }} |
| 54 |
- run: rustup target add ${{ matrix.rust_target }} |
| 55 |
- uses: msys2/setup-msys2@v2 |
| 56 |
with: |
| 57 |
release: false |
| 58 |
install: ${{ matrix.package }} |
| 59 |
- run: echo "c:/msys64/bin" | Out-File -FilePath $env:GITHUB_PATH -Append |
| 60 |
- run: echo "${{ matrix.mingw_path }}" | Out-File -FilePath $env:GITHUB_PATH -Append |
| 61 |
if: ${{ matrix.mingw_path }}" |
| 62 |
- run: cargo test --target ${{ matrix.rust_target }} |
| 63 |
env: |
| 64 |
TARGET: ${{ matrix.rust_target}} |
| 65 |
|
| 66 |
bare-cross-build: |
| 67 |
runs-on: ubuntu-latest |
| 68 |
strategy: |
| 69 |
fail-fast: false |
| 70 |
matrix: |
| 71 |
rust_toolchain: [nightly] |
| 72 |
rust_target: |
| 73 |
# BSDs: could be tested with full system emulation |
| 74 |
# - x86_64-unknown-dragonfly |
| 75 |
# - x86_64-unknown-freebsd |
| 76 |
- x86_64-unknown-haiku |
| 77 |
# - x86_64-unknown-netbsd |
| 78 |
- x86_64-unknown-openbsd |
| 79 |
- x86_64-unknown-redox |
| 80 |
- x86_64-fuchsia |
| 81 |
- wasm32-unknown-unknown |
| 82 |
timeout-minutes: 20 |
| 83 |
steps: |
| 84 |
- uses: actions/checkout@v2 |
| 85 |
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal |
| 86 |
- run: rustup default ${{ matrix.rust_toolchain }} |
| 87 |
- run: rustup component add rust-src --toolchain nightly --target ${{ matrix.rust_target }} |
| 88 |
- run: cargo build --target ${{ matrix.rust_target }} -Zbuild-std |
| 89 |
|
| 90 |
cross-ios-build: |
| 91 |
runs-on: macos-latest |
| 92 |
strategy: |
| 93 |
fail-fast: false |
| 94 |
matrix: |
| 95 |
rust_toolchain: [nightly, stable] |
| 96 |
rust_target: |
| 97 |
- aarch64-apple-ios |
| 98 |
- x86_64-apple-ios |
| 99 |
timeout-minutes: 20 |
| 100 |
steps: |
| 101 |
- uses: actions/checkout@v2 |
| 102 |
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal |
| 103 |
- run: rustup default ${{ matrix.rust_toolchain }} |
| 104 |
- run: rustup target add ${{ matrix.rust_target }} |
| 105 |
- run: cargo build --target=${{ matrix.rust_target }} |