Skip to content

Commit 0daa871

Browse files
committed
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!
1 parent 3b2d7f3 commit 0daa871

File tree

4 files changed

+204
-306
lines changed

4 files changed

+204
-306
lines changed

.github/workflows/main.yml

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
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+
max-parallel: 10
67+
matrix:
68+
target:
69+
# Dockers that are run through docker on linux
70+
- i686-unknown-linux-gnu
71+
- x86_64-unknown-linux-gnu
72+
- x86_64-unknown-linux-gnu-emulated
73+
- arm-unknown-linux-gnueabihf
74+
- armv7-unknown-linux-gnueabihf
75+
- aarch64-unknown-linux-gnu
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
81+
- wasm32-unknown-unknown
82+
- i586-unknown-linux-gnu
83+
- x86_64-linux-android
84+
- arm-linux-androideabi
85+
- mipsel-unknown-linux-musl
86+
- aarch64-linux-android
87+
- nvptx64-nvidia-cuda
88+
- thumbv6m-none-eabi
89+
- thumbv7m-none-eabi
90+
- thumbv7em-none-eabi
91+
- thumbv7em-none-eabihf
92+
93+
# macOS targets
94+
- x86_64-apple-darwin
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
100+
# FIXME: Disassembly not implemented for the # following targets:
101+
# - x86_64-pc-windows-gnu:
102+
# - i686-pc-windows-gnu:
103+
# - i686-pc-windows-msvc:
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
133+
- target: wasm32-unknown-unknown
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
141+
- target: i586-unknown-linux-gnu
142+
os: ubuntu-latest
143+
- target: x86_64-linux-android
144+
os: ubuntu-latest
145+
disable_assert_instr: 1
146+
- target: arm-linux-androideabi
147+
os: ubuntu-latest
148+
disable_assert_instr: 1
149+
- target: mipsel-unknown-linux-musl
150+
os: ubuntu-latest
151+
norun: 1
152+
- target: aarch64-linux-android
153+
os: ubuntu-latest
154+
disable_assert_instr: 1
155+
- target: nvptx64-nvidia-cuda
156+
os: ubuntu-latest
157+
- target: thumbv6m-none-eabi
158+
os: ubuntu-latest
159+
- target: thumbv7m-none-eabi
160+
os: ubuntu-latest
161+
- target: thumbv7em-none-eabi
162+
os: ubuntu-latest
163+
- target: thumbv7em-none-eabihf
164+
os: ubuntu-latest
165+
166+
steps:
167+
- uses: actions/checkout@master
168+
- name: Install Rust (rustup)
169+
run: rustup update nightly --no-self-update && 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
174+
echo "##[add-path]$HOME/.cargo/bin"
175+
if: matrix.os == 'macos-latest'
176+
- run: rustup target add ${{ matrix.target }}
177+
if: "!endsWith(matrix.target, 'emulated')"
178+
- run: cargo generate-lockfile
179+
180+
# Configure some env vars based on matrix configuration
181+
- run: echo "##[set-env name=NORUN]1"
182+
if: matrix.norun != '' || startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
183+
- run: echo "##[set-env name=STDARCH_TEST_EVERYTHING]1"
184+
if: matrix.test_everything != ''
185+
- run: echo "##[set-env name=RUSTFLAGS]${{ matrix.rustflags }}"
186+
if: matrix.rustflags != ''
187+
- run: echo "##[set-env name=STDARCH_DISABLE_ASSERT_INSTR]1"
188+
if: matrix.disable_assert_instr != ''
189+
- run: echo "##[set-env name=NOSTD]1"
190+
if: startsWith(matrix.target, 'thumb') || matrix.target == 'nvptx64-nvidia-cuda'
191+
192+
# Windows & OSX go straight to `run.sh` ...
193+
- run: ./ci/run.sh
194+
shell: bash
195+
if: matrix.os != 'ubuntu-latest' || startsWith(matrix.target, 'thumb')
196+
env:
197+
TARGET: ${{ matrix.target }}
198+
199+
# ... while Linux goes to `run-docker.sh`
200+
- run: ./ci/run-docker.sh ${{ matrix.target }}
201+
shell: bash
202+
if: "matrix.os == 'ubuntu-latest' && !startsWith(matrix.target, 'thumb')"
203+
env:
204+
TARGET: ${{ matrix.target }}

ci/azure-install-rust.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)