]> git.proxmox.com Git - rustc.git/blame - library/stdarch/.github/workflows/main.yml
New upstream version 1.74.1+dfsg1
[rustc.git] / library / stdarch / .github / workflows / main.yml
CommitLineData
74b04a01
XL
1name: CI
2on:
3 push:
4 branches:
5 - auto
6 - try
7 pull_request:
8 branches:
9 - master
10
11jobs:
12 style:
13 name: Check Style
14 runs-on: ubuntu-latest
15 steps:
16 - uses: actions/checkout@master
17 - name: Install Rust
18 run: rustup update nightly && rustup default nightly
19 - run: ci/style.sh
20
21 docs:
22 name: Build Documentation
23 needs: [style]
24 runs-on: ubuntu-latest
25 steps:
26 - uses: actions/checkout@master
27 - name: Install Rust
28 run: rustup update nightly && rustup default nightly
29 - run: ci/dox.sh
30 env:
31 CI: 1
32 - name: Publish documentation
33 run: |
34 cd target/doc
35 git init
36 git add .
37 git -c user.name='ci' -c user.email='ci' commit -m init
38 git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
39 if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
40
41 verify:
42 name: Automatic intrinsic verification
43 needs: [style]
44 runs-on: ubuntu-latest
45 steps:
46 - uses: actions/checkout@master
47 - name: Install Rust
48 run: rustup update nightly && rustup default nightly
49 - run: cargo test --manifest-path crates/stdarch-verify/Cargo.toml
50
51 env_override:
52 name: Env Override
53 needs: [style]
54 runs-on: ubuntu-latest
55 steps:
56 - uses: actions/checkout@master
57 - name: Install Rust
58 run: rustup update nightly && rustup default nightly
59 - run: RUST_STD_DETECT_UNSTABLE=avx cargo test --features=std_detect_env_override --manifest-path crates/std_detect/Cargo.toml env_override_no_avx
60
61 test:
62 needs: [style]
63 name: Test
64 runs-on: ${{ matrix.os }}
65 strategy:
66 matrix:
67 target:
68 # Dockers that are run through docker on linux
69 - i686-unknown-linux-gnu
70 - x86_64-unknown-linux-gnu
71 - x86_64-unknown-linux-gnu-emulated
72 - arm-unknown-linux-gnueabihf
73 - armv7-unknown-linux-gnueabihf
74 - aarch64-unknown-linux-gnu
a2a8927a 75 - riscv64gc-unknown-linux-gnu
74b04a01 76 - powerpc64le-unknown-linux-gnu
781aab86
FG
77 # MIPS targets disabled since they are dropped to tier 3.
78 # See https://github.com/rust-lang/compiler-team/issues/648
79 #- mips-unknown-linux-gnu
80 #- mips64-unknown-linux-gnuabi64
81 #- mips64el-unknown-linux-gnuabi64
82 #- mipsel-unknown-linux-musl
74b04a01 83 - s390x-unknown-linux-gnu
3dfed10e 84 - wasm32-wasi
74b04a01 85 - i586-unknown-linux-gnu
74b04a01
XL
86 - nvptx64-nvidia-cuda
87 - thumbv6m-none-eabi
88 - thumbv7m-none-eabi
89 - thumbv7em-none-eabi
90 - thumbv7em-none-eabihf
91
92 # macOS targets
cdc7bbd5
XL
93 #- x86_64-apple-darwin
94 - aarch64-apple-darwin
74b04a01
XL
95 # FIXME: gh-actions build environment doesn't have linker support
96 # - i686-apple-darwin
97
98 # Windows targets
99 - x86_64-pc-windows-msvc
fc512014 100 - i686-pc-windows-msvc
74b04a01
XL
101 # FIXME: Disassembly not implemented for the # following targets:
102 # - x86_64-pc-windows-gnu:
103 # - i686-pc-windows-gnu:
fc512014 104 # - aarch64-pc-windows-msvc:
74b04a01
XL
105
106 include:
107 - target: i686-unknown-linux-gnu
108 os: ubuntu-latest
109 - target: x86_64-unknown-linux-gnu
110 os: ubuntu-latest
111 - target: x86_64-unknown-linux-gnu-emulated
112 os: ubuntu-latest
113 test_everything: true
114 rustflags: --cfg stdarch_intel_sde
115 - target: arm-unknown-linux-gnueabihf
116 os: ubuntu-latest
117 - target: armv7-unknown-linux-gnueabihf
118 os: ubuntu-latest
781aab86
FG
119 # MIPS targets disabled since they are dropped to tier 3.
120 # See https://github.com/rust-lang/compiler-team/issues/648
121 #- target: mips-unknown-linux-gnu
122 # os: ubuntu-latest
123 # norun: true
124 #- target: mips64-unknown-linux-gnuabi64
125 # os: ubuntu-latest
126 # norun: true
127 #- target: mips64el-unknown-linux-gnuabi64
128 # os: ubuntu-latest
129 # norun: true
130 #- target: mipsel-unknown-linux-musl
131 # os: ubuntu-latest
132 # norun: 1
74b04a01
XL
133 - target: powerpc64le-unknown-linux-gnu
134 os: ubuntu-latest
135 disable_assert_instr: true
136 - target: s390x-unknown-linux-gnu
137 os: ubuntu-latest
3dfed10e 138 - target: wasm32-wasi
74b04a01 139 os: ubuntu-latest
cdc7bbd5
XL
140 - target: aarch64-apple-darwin
141 os: macos-latest
142 norun: true
74b04a01
XL
143 - target: aarch64-unknown-linux-gnu
144 os: ubuntu-latest
c295e0f8
XL
145 - target: x86_64-apple-darwin
146 os: macos-11
74b04a01
XL
147 - target: x86_64-pc-windows-msvc
148 os: windows-latest
fc512014
XL
149 - target: i686-pc-windows-msvc
150 os: windows-latest
74b04a01
XL
151 - target: i586-unknown-linux-gnu
152 os: ubuntu-latest
74b04a01
XL
153 - target: nvptx64-nvidia-cuda
154 os: ubuntu-latest
155 - target: thumbv6m-none-eabi
156 os: ubuntu-latest
157 - target: thumbv7m-none-eabi
158 os: ubuntu-latest
159 - target: thumbv7em-none-eabi
160 os: ubuntu-latest
161 - target: thumbv7em-none-eabihf
162 os: ubuntu-latest
a2a8927a
XL
163 - target: riscv64gc-unknown-linux-gnu
164 os: ubuntu-latest
74b04a01
XL
165
166 steps:
167 - uses: actions/checkout@master
3c0e092e
XL
168 with:
169 submodules: recursive
74b04a01
XL
170 - name: Install Rust (rustup)
171 run: |
172 rustup update nightly --no-self-update
173 rustup default nightly
174 if: matrix.os != 'macos-latest'
175 - name: Install Rust (macos)
176 run: |
177 curl https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
fc512014 178 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
74b04a01
XL
179 rustup update nightly --no-self-update
180 rustup default nightly
181 if: matrix.os == 'macos-latest'
182 - run: |
183 rustup default nightly
184 rustup target add ${{ matrix.target }}
185 if: "!endsWith(matrix.target, 'emulated')"
cdc7bbd5
XL
186 - name: Setup (aarch64-apple-darwin)
187 run: |
cdc7bbd5
XL
188 echo "SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path)" >> $GITHUB_ENV
189 echo "MACOS_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.0 --show-sdk-platform-version)" >> $GITHUB_ENV
190 if: matrix.target == 'aarch64-apple-darwin'
74b04a01
XL
191 - run: cargo generate-lockfile
192
193 # Configure some env vars based on matrix configuration
fc512014 194 - run: echo "NORUN=1" >> $GITHUB_ENV
74b04a01 195 if: matrix.norun != '' || startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
fc512014 196 - run: echo "STDARCH_TEST_EVERYTHING=1" >> $GITHUB_ENV
74b04a01 197 if: matrix.test_everything != ''
fc512014 198 - run: echo "RUSTFLAGS=${{ matrix.rustflags }}" >> $GITHUB_ENV
74b04a01 199 if: matrix.rustflags != ''
fc512014 200 - run: echo "STDARCH_DISABLE_ASSERT_INSTR=1" >> $GITHUB_ENV
74b04a01 201 if: matrix.disable_assert_instr != ''
fc512014 202 - run: echo "NOSTD=1" >> $GITHUB_ENV
74b04a01
XL
203 if: startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
204
205 # Windows & OSX go straight to `run.sh` ...
206 - run: ./ci/run.sh
207 shell: bash
208 if: matrix.os != 'ubuntu-latest' || startsWith(matrix.target, 'thumb')
209 env:
210 TARGET: ${{ matrix.target }}
211
212 # ... while Linux goes to `run-docker.sh`
213 - run: ./ci/run-docker.sh ${{ matrix.target }}
214 shell: bash
215 if: "matrix.os == 'ubuntu-latest' && !startsWith(matrix.target, 'thumb')"
216 env:
217 TARGET: ${{ matrix.target }}
49aad941
FG
218
219 build-std-detect:
220 needs: [style]
221 name: Build std_detect
222 runs-on: ubuntu-latest
223 steps:
224 - uses: actions/checkout@master
225 - name: Install Rust
226 run: rustup update nightly && rustup default nightly
227 - run: ./ci/build-std-detect.sh