Skip to content

Commit 53a7e00

Browse files
authored
Migrate CI to GitHub Actions (#813)
* Migrate CI to GitHub Actions This involves less secret and user management than azure pipelines, has more concurrency by default for repos, and in general has a bit more modern syntax! * Disable clippy on CI for now Looks like it's got quite a few errors
1 parent 4873f2e commit 53a7e00

File tree

4 files changed

+207
-310
lines changed

4 files changed

+207
-310
lines changed

.github/workflows/main.yml

+203
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- auto
6+
- try
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
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
80+
- wasm32-unknown-unknown
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
99+
# FIXME: Disassembly not implemented for the # following targets:
100+
# - x86_64-pc-windows-gnu:
101+
# - i686-pc-windows-gnu:
102+
# - i686-pc-windows-msvc:
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
117+
rustflags: -C target-feature=+neon
118+
- target: mips-unknown-linux-gnu
119+
os: ubuntu-latest
120+
norun: true
121+
- target: mips64-unknown-linux-gnuabi64
122+
os: ubuntu-latest
123+
norun: true
124+
- target: mips64el-unknown-linux-gnuabi64
125+
os: ubuntu-latest
126+
norun: true
127+
- target: powerpc64le-unknown-linux-gnu
128+
os: ubuntu-latest
129+
disable_assert_instr: true
130+
- target: s390x-unknown-linux-gnu
131+
os: ubuntu-latest
132+
- target: wasm32-unknown-unknown
133+
os: ubuntu-latest
134+
- target: aarch64-unknown-linux-gnu
135+
os: ubuntu-latest
136+
- target: x86_64-apple-darwin
137+
os: macos-latest
138+
- target: x86_64-pc-windows-msvc
139+
os: windows-latest
140+
- target: i586-unknown-linux-gnu
141+
os: ubuntu-latest
142+
- target: x86_64-linux-android
143+
os: ubuntu-latest
144+
disable_assert_instr: 1
145+
- target: arm-linux-androideabi
146+
os: ubuntu-latest
147+
disable_assert_instr: 1
148+
- target: mipsel-unknown-linux-musl
149+
os: ubuntu-latest
150+
norun: 1
151+
- target: aarch64-linux-android
152+
os: ubuntu-latest
153+
disable_assert_instr: 1
154+
- target: nvptx64-nvidia-cuda
155+
os: ubuntu-latest
156+
- target: thumbv6m-none-eabi
157+
os: ubuntu-latest
158+
- target: thumbv7m-none-eabi
159+
os: ubuntu-latest
160+
- target: thumbv7em-none-eabi
161+
os: ubuntu-latest
162+
- target: thumbv7em-none-eabihf
163+
os: ubuntu-latest
164+
165+
steps:
166+
- uses: actions/checkout@master
167+
- name: Install Rust (rustup)
168+
run: rustup update nightly --no-self-update && rustup default nightly
169+
if: matrix.os != 'macos-latest'
170+
- name: Install Rust (macos)
171+
run: |
172+
curl https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
173+
echo "##[add-path]$HOME/.cargo/bin"
174+
if: matrix.os == 'macos-latest'
175+
- run: rustup target add ${{ matrix.target }}
176+
if: "!endsWith(matrix.target, 'emulated')"
177+
- run: cargo generate-lockfile
178+
179+
# Configure some env vars based on matrix configuration
180+
- run: echo "##[set-env name=NORUN]1"
181+
if: matrix.norun != '' || startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
182+
- run: echo "##[set-env name=STDARCH_TEST_EVERYTHING]1"
183+
if: matrix.test_everything != ''
184+
- run: echo "##[set-env name=RUSTFLAGS]${{ matrix.rustflags }}"
185+
if: matrix.rustflags != ''
186+
- run: echo "##[set-env name=STDARCH_DISABLE_ASSERT_INSTR]1"
187+
if: matrix.disable_assert_instr != ''
188+
- run: echo "##[set-env name=NOSTD]1"
189+
if: startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
190+
191+
# Windows & OSX go straight to `run.sh` ...
192+
- run: ./ci/run.sh
193+
shell: bash
194+
if: matrix.os != 'ubuntu-latest' || startsWith(matrix.target, 'thumb')
195+
env:
196+
TARGET: ${{ matrix.target }}
197+
198+
# ... while Linux goes to `run-docker.sh`
199+
- run: ./ci/run-docker.sh ${{ matrix.target }}
200+
shell: bash
201+
if: "matrix.os == 'ubuntu-latest' && !startsWith(matrix.target, 'thumb')"
202+
env:
203+
TARGET: ${{ matrix.target }}

ci/azure-install-rust.yml

-76
This file was deleted.

0 commit comments

Comments
 (0)