-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.39 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI
on:
push:
branches:
- main
env:
GH_TOKEN: ${{ github.token }}
RUSTUP_TOOLCHAIN: 1.78.0
jobs:
dist:
name: Build rust-std-hermit distribution artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout rust
uses: actions/checkout@v4
with:
repository: rust-lang/rust
ref: ${{ env.RUSTUP_TOOLCHAIN }}
path: rust
- name: Install arch-specific GCC variants
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu gcc-riscv64-linux-gnu gcc-x86-64-linux-gnu
- name: Build rust-std distribution artifacts
run: ./x dist --config ../rust-config.toml rust-std
working-directory: ./rust
env:
CC_aarch64_unknown_hermit: aarch64-linux-gnu-gcc
CC_riscv64gc_unknown_hermit: riscv64-linux-gnu-gcc
CFLAGS_riscv64gc_unknown_hermit: -march=rv64gc -mabi=lp64d
CC_x86_64_unknown_hermit: x86_64-linux-gnu-gcc
- name: Create distribution artifacts
run: |
./dist.sh ${{ env.RUSTUP_TOOLCHAIN }} aarch64-unknown-hermit
./dist.sh ${{ env.RUSTUP_TOOLCHAIN }} riscv64gc-unknown-hermit
./dist.sh ${{ env.RUSTUP_TOOLCHAIN }} x86_64-unknown-hermit
- run: gh release create ${{ env.RUSTUP_TOOLCHAIN }} --title ${{ env.RUSTUP_TOOLCHAIN }} rust/build/dist/*.tar.gz