forked from nagisa/rust_libloading
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (134 loc) · 5.11 KB
/
libloading.yml
File metadata and controls
141 lines (134 loc) · 5.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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.88.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 update -p libc --precise 0.2.155
if: ${{ matrix.rust_toolchain == '1.88.0' }}
- run: cargo clippy
- run: cargo test -- --nocapture
- run: cargo test --release -- --nocapture
- run: cargo test --no-default-features -- --nocapture
- run: cargo test --release --no-default-features -- --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
no-std-build-test:
runs-on: ubuntu-latest
# This will rebuild core and alloc, which will re-mangle symbols in alloc,
# which then will break the pre-compiled std. This will cause the program to fail to link.
# This test does not test anything in an actual no-std environment only that the library compiles on it.
# We test all no-std only functions together with the ordinary functions.
steps:
- uses: actions/checkout@v4
- name: Add nightly toolchain
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Compile without the standard library
run: cargo clean && cargo +nightly build -Zbuild-std=core,alloc --no-default-features
windows-test:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
rust_toolchain: [nightly, stable]
rust_target:
- x86_64-pc-windows-gnullvm
- i686-pc-windows-gnu
include:
- rust_target: x86_64-pc-windows-gnullvm
mingw_path: C:/msys64/clang64/bin
package: mingw-w64-clang-x86_64-clang
- 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 "${{ 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}}
msys2-test:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- run: rustup install nightly --profile=minimal
- run: rustup default nightly
- run: rustup component add rust-src
- uses: msys2/setup-msys2@v2
with:
release: false
install: gcc
- run: echo "INPUT(libmsys-2.0.a)" | Out-File -FilePath "C:\msys64\usr\lib\libcygwin.a"
- run: |
$env:PATH = "C:\msys64\usr\bin\;$env:PATH"
cargo test --target x86_64-pc-cygwin -Zbuild-std
env:
CARGO_TARGET_X86_64_PC_CYGWIN_LINKER: x86_64-pc-cygwin-gcc.exe
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-unknown-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 }}