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