]> git.proxmox.com Git - rustc.git/blame - library/stdarch/.github/workflows/main.yml
New upstream version 1.70.0+dfsg2
[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
XL
76 - powerpc64le-unknown-linux-gnu
77 - mips-unknown-linux-gnu
78 - mips64-unknown-linux-gnuabi64
79 - mips64el-unknown-linux-gnuabi64
80 - s390x-unknown-linux-gnu
3dfed10e 81 - wasm32-wasi
74b04a01 82 - i586-unknown-linux-gnu
74b04a01 83 - mipsel-unknown-linux-musl
74b04a01
XL
84 - nvptx64-nvidia-cuda
85 - thumbv6m-none-eabi
86 - thumbv7m-none-eabi
87 - thumbv7em-none-eabi
88 - thumbv7em-none-eabihf
89
90 # macOS targets
cdc7bbd5
XL
91 #- x86_64-apple-darwin
92 - aarch64-apple-darwin
74b04a01
XL
93 # FIXME: gh-actions build environment doesn't have linker support
94 # - i686-apple-darwin
95
96 # Windows targets
97 - x86_64-pc-windows-msvc
fc512014 98 - i686-pc-windows-msvc
74b04a01
XL
99 # FIXME: Disassembly not implemented for the # following targets:
100 # - x86_64-pc-windows-gnu:
101 # - i686-pc-windows-gnu:
fc512014 102 # - aarch64-pc-windows-msvc:
74b04a01
XL
103
104 include:
105 - target: i686-unknown-linux-gnu
106 os: ubuntu-latest
107 - target: x86_64-unknown-linux-gnu
108 os: ubuntu-latest
109 - target: x86_64-unknown-linux-gnu-emulated
110 os: ubuntu-latest
111 test_everything: true
112 rustflags: --cfg stdarch_intel_sde
113 - target: arm-unknown-linux-gnueabihf
114 os: ubuntu-latest
115 - target: armv7-unknown-linux-gnueabihf
116 os: ubuntu-latest
74b04a01
XL
117 - target: mips-unknown-linux-gnu
118 os: ubuntu-latest
119 norun: true
120 - target: mips64-unknown-linux-gnuabi64
121 os: ubuntu-latest
122 norun: true
123 - target: mips64el-unknown-linux-gnuabi64
124 os: ubuntu-latest
125 norun: true
126 - target: powerpc64le-unknown-linux-gnu
127 os: ubuntu-latest
128 disable_assert_instr: true
129 - target: s390x-unknown-linux-gnu
130 os: ubuntu-latest
3dfed10e 131 - target: wasm32-wasi
74b04a01 132 os: ubuntu-latest
cdc7bbd5
XL
133 - target: aarch64-apple-darwin
134 os: macos-latest
135 norun: true
74b04a01
XL
136 - target: aarch64-unknown-linux-gnu
137 os: ubuntu-latest
c295e0f8
XL
138 - target: x86_64-apple-darwin
139 os: macos-11
74b04a01
XL
140 - target: x86_64-pc-windows-msvc
141 os: windows-latest
fc512014
XL
142 - target: i686-pc-windows-msvc
143 os: windows-latest
74b04a01
XL
144 - target: i586-unknown-linux-gnu
145 os: ubuntu-latest
74b04a01
XL
146 - target: mipsel-unknown-linux-musl
147 os: ubuntu-latest
148 norun: 1
74b04a01
XL
149 - target: nvptx64-nvidia-cuda
150 os: ubuntu-latest
151 - target: thumbv6m-none-eabi
152 os: ubuntu-latest
153 - target: thumbv7m-none-eabi
154 os: ubuntu-latest
155 - target: thumbv7em-none-eabi
156 os: ubuntu-latest
157 - target: thumbv7em-none-eabihf
158 os: ubuntu-latest
a2a8927a
XL
159 - target: riscv64gc-unknown-linux-gnu
160 os: ubuntu-latest
74b04a01
XL
161
162 steps:
163 - uses: actions/checkout@master
3c0e092e
XL
164 with:
165 submodules: recursive
74b04a01
XL
166 - name: Install Rust (rustup)
167 run: |
168 rustup update nightly --no-self-update
169 rustup default nightly
170 if: matrix.os != 'macos-latest'
171 - name: Install Rust (macos)
172 run: |
173 curl https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
fc512014 174 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
74b04a01
XL
175 rustup update nightly --no-self-update
176 rustup default nightly
177 if: matrix.os == 'macos-latest'
178 - run: |
179 rustup default nightly
180 rustup target add ${{ matrix.target }}
181 if: "!endsWith(matrix.target, 'emulated')"
cdc7bbd5
XL
182 - name: Setup (aarch64-apple-darwin)
183 run: |
cdc7bbd5
XL
184 echo "SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path)" >> $GITHUB_ENV
185 echo "MACOS_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.0 --show-sdk-platform-version)" >> $GITHUB_ENV
186 if: matrix.target == 'aarch64-apple-darwin'
74b04a01
XL
187 - run: cargo generate-lockfile
188
189 # Configure some env vars based on matrix configuration
fc512014 190 - run: echo "NORUN=1" >> $GITHUB_ENV
74b04a01 191 if: matrix.norun != '' || startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
fc512014 192 - run: echo "STDARCH_TEST_EVERYTHING=1" >> $GITHUB_ENV
74b04a01 193 if: matrix.test_everything != ''
fc512014 194 - run: echo "RUSTFLAGS=${{ matrix.rustflags }}" >> $GITHUB_ENV
74b04a01 195 if: matrix.rustflags != ''
fc512014 196 - run: echo "STDARCH_DISABLE_ASSERT_INSTR=1" >> $GITHUB_ENV
74b04a01 197 if: matrix.disable_assert_instr != ''
fc512014 198 - run: echo "NOSTD=1" >> $GITHUB_ENV
74b04a01
XL
199 if: startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
200
201 # Windows & OSX go straight to `run.sh` ...
202 - run: ./ci/run.sh
203 shell: bash
204 if: matrix.os != 'ubuntu-latest' || startsWith(matrix.target, 'thumb')
205 env:
206 TARGET: ${{ matrix.target }}
207
208 # ... while Linux goes to `run-docker.sh`
209 - run: ./ci/run-docker.sh ${{ matrix.target }}
210 shell: bash
211 if: "matrix.os == 'ubuntu-latest' && !startsWith(matrix.target, 'thumb')"
212 env:
213 TARGET: ${{ matrix.target }}