| 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.71.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 update -p libc --precise 0.2.155 |
| 27 |
if: ${{ matrix.rust_toolchain == '1.71.0' }} |
| 28 |
- run: cargo clippy |
| 29 |
- run: cargo test -- --nocapture |
| 30 |
- run: cargo test --release -- --nocapture |
| 31 |
- run: cargo rustdoc -Zunstable-options --config 'build.rustdocflags=["--cfg", "libloading_docs", "-D", "rustdoc::broken_intra_doc_links"]' |
| 32 |
if: ${{ matrix.rust_toolchain == 'nightly' }} |
| 33 |
|
| 34 |
shell: bash |
| 35 |
|
| 36 |
windows-test: |
| 37 |
runs-on: windows-latest |
| 38 |
strategy: |
| 39 |
fail-fast: false |
| 40 |
matrix: |
| 41 |
rust_toolchain: [nightly, stable] |
| 42 |
rust_target: |
| 43 |
- x86_64-pc-windows-gnullvm |
| 44 |
- i686-pc-windows-gnu |
| 45 |
include: |
| 46 |
- rust_target: x86_64-pc-windows-gnullvm |
| 47 |
mingw_path: C:/msys64/clang64/bin |
| 48 |
package: mingw-w64-clang-x86_64-clang |
| 49 |
- rust_target: i686-pc-windows-gnu |
| 50 |
mingw_path: C:/msys64/mingw32/bin |
| 51 |
package: mingw-w64-i686-gcc |
| 52 |
steps: |
| 53 |
- uses: actions/checkout@v2 |
| 54 |
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal |
| 55 |
- run: rustup default ${{ matrix.rust_toolchain }} |
| 56 |
- run: rustup target add ${{ matrix.rust_target }} |
| 57 |
- uses: msys2/setup-msys2@v2 |
| 58 |
with: |
| 59 |
release: false |
| 60 |
install: ${{ matrix.package }} |
| 61 |
- run: echo "${{ matrix.mingw_path }}" | Out-File -FilePath $env:GITHUB_PATH -Append |
| 62 |
if: ${{ matrix.mingw_path }}" |
| 63 |
- run: cargo test --target ${{ matrix.rust_target }} |
| 64 |
env: |
| 65 |
TARGET: ${{ matrix.rust_target}} |
| 66 |
|
| 67 |
msys2-test: |
| 68 |
runs-on: windows-latest |
| 69 |
strategy: |
| 70 |
fail-fast: false |
| 71 |
steps: |
| 72 |
- uses: actions/checkout@v2 |
| 73 |
- run: rustup install nightly --profile=minimal |
| 74 |
- run: rustup default nightly |
| 75 |
- run: rustup component add rust-src |
| 76 |
- uses: msys2/setup-msys2@v2 |
| 77 |
with: |
| 78 |
release: false |
| 79 |
install: gcc |
| 80 |
- run: echo "INPUT(libmsys-2.0.a)" | Out-File -FilePath "C:\msys64\usr\lib\libcygwin.a" |
| 81 |
- run: | |
| 82 |
$env:PATH = "C:\msys64\usr\bin\;$env:PATH" |
| 83 |
cargo test --target x86_64-pc-cygwin -Zbuild-std |
| 84 |
env: |
| 85 |
CARGO_TARGET_X86_64_PC_CYGWIN_LINKER: x86_64-pc-cygwin-gcc.exe |
| 86 |
|
| 87 |
bare-cross-build: |
| 88 |
runs-on: ubuntu-latest |
| 89 |
strategy: |
| 90 |
fail-fast: false |
| 91 |
matrix: |
| 92 |
rust_toolchain: [nightly] |
| 93 |
rust_target: |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
- x86_64-unknown-haiku |
| 98 |
|
| 99 |
- x86_64-unknown-openbsd |
| 100 |
- x86_64-unknown-redox |
| 101 |
- x86_64-unknown-fuchsia |
| 102 |
- wasm32-unknown-unknown |
| 103 |
timeout-minutes: 20 |
| 104 |
steps: |
| 105 |
- uses: actions/checkout@v2 |
| 106 |
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal |
| 107 |
- run: rustup default ${{ matrix.rust_toolchain }} |
| 108 |
- run: rustup component add rust-src --toolchain nightly --target ${{ matrix.rust_target }} |
| 109 |
- run: cargo build --target ${{ matrix.rust_target }} -Zbuild-std |
| 110 |
|
| 111 |
cross-ios-build: |
| 112 |
runs-on: macos-latest |
| 113 |
strategy: |
| 114 |
fail-fast: false |
| 115 |
matrix: |
| 116 |
rust_toolchain: [nightly, stable] |
| 117 |
rust_target: |
| 118 |
- aarch64-apple-ios |
| 119 |
- x86_64-apple-ios |
| 120 |
timeout-minutes: 20 |
| 121 |
steps: |
| 122 |
- uses: actions/checkout@v2 |
| 123 |
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal |
| 124 |
- run: rustup default ${{ matrix.rust_toolchain }} |
| 125 |
- run: rustup target add ${{ matrix.rust_target }} |
| 126 |
- run: cargo build --target=${{ matrix.rust_target }} |