-
Notifications
You must be signed in to change notification settings - Fork 19
57 lines (55 loc) · 1.39 KB
/
pr-build.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: PR Build
on:
pull_request:
branches:
- '*'
concurrency: pr-${{ github.ref }}
jobs:
prebuild:
name: Pre build
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check Rust styles
run: cargo fmt --check
build-windows:
name: Build
uses: ./.github/workflows/ci-windows.yml
needs: prebuild
build-linux:
name: Build
uses: ./.github/workflows/ci-linux.yml
needs: prebuild
build-mac:
name: Build
uses: ./.github/workflows/ci-mac.yml
needs: prebuild
with:
kernel-target: aarch64-unknown-none-softfloat
build-docs:
name: Build
uses: ./.github/workflows/ci-docs.yml
needs: prebuild
postbuild:
name: Post build
runs-on: ubuntu-24.04
needs: [build-windows, build-linux, build-mac, build-docs]
steps:
- name: Generate build information
run: |
import json
info = {
"pr": ${{ github.event.number }},
"base": "${{ github.base_ref }}",
"head": "${{ github.event.pull_request.head.sha }}",
"author": "${{ github.event.pull_request.head.user.login }}"
}
with open("build-info.json", "w") as fp:
json.dump(info, fp)
shell: python
- name: Upload build information
uses: actions/upload-artifact@v4
with:
name: build-info
path: build-info.json