-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (129 loc) · 4.12 KB
/
rust-compiler-builder.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Rust Compiler Builder
on:
push:
paths-ignore:
- '**/README.md'
workflow_dispatch:
inputs:
rust-backtrace:
description: Enable RUST_BACKTRACE (0 or 1)
required: false
default: '1'
type: choice
options:
- '0'
- '1'
rust-channel:
description: Set RUST_CHANNEL (dev, nightly, beta, stable)
required: false
default: 'dev'
type: choice
options:
- dev
- nightly
- beta
- stable
rust-verbose:
description: Set RUST_VERBOSE level (0, 1, 2, 3)
required: false
default: '3'
type: choice
options:
- '0'
- '1'
- '2'
- '3'
schedule:
# https://crontab.guru/
# At 12:00 AM
- cron: 0 0 * * *
jobs:
build:
name: ${{ matrix.rust-targets }} [${{ matrix.xcode-version }}] [${{ matrix.os }}]
strategy:
fail-fast: false
matrix:
include:
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
# https://github.com/actions/runner-images/tree/main/images/macos
# https://developer.apple.com/support/xcode/
# Regression: arm64e-apple-darwin
# Regression: macos-14 arm64
- rust-targets: aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-tvos,arm64e-apple-ios
os: macos-13 # x86-64
xcode-version: 15.2
rust-config: configure
rust-use-lld: false
macosx_deployment_target: 11.0
iphoneos_deployment_target: 14.0
tvos_deployment_target: 14.0
runs-on: ${{ matrix.os }}
env:
BOOTSTRAP_SKIP_TARGET_SANITY: 0
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
IPHONEOS_DEPLOYMENT_TARGET: ${{ matrix.iphoneos_deployment_target }}
TVOS_DEPLOYMENT_TARGET: ${{ matrix.tvos_deployment_target }}
RUST_BACKTRACE: ${{ github.event.inputs.rust-backtrace || '0' }}
RUST_CHANNEL: ${{ github.event.inputs.rust-channel || 'dev' }}
RUST_TARGETS: ${{ matrix.rust-targets }}
RUST_VERBOSE: ${{ github.event.inputs.rust-verbose || '0' }}
steps:
- name: Install Xcode ${{ matrix.xcode-version }}
run: |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode-version }}.app
sudo xcode-select -p
- name: Install Ninja
run: brew install ninja
- name: Install sccache
run: brew install sccache
- name: Install llvm
run: |
brew install llvm
echo "PATH=$PATH:/opt/homebrew/opt/llvm/bin:/usr/local/opt/llvm/bin" >> $GITHUB_ENV
- name: Show System Info
run: |
echo ${PATH}
uname -a
xcodebuild -version
xcrun --show-sdk-path
sccache --version
cmake --version
ninja --version
clang -v
ld -v
lld -flavor ld --version
df -h .
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Rust
uses: actions/checkout@v4
with:
repository: rust-lang/rust
ref: master
submodules: true
path: rust
- name: Configure Rust
run: make ${{ matrix.rust-config }}
env:
RUST_USE_LLD: ${{ matrix.rust-use-lld }}
- name: Show config.toml
run: cat config.toml
working-directory: ./rust
- name: Build Rust
run: make all
working-directory: ./rust
- name: Show Target Spec
run: make show-target-info
- name: Build Rust dist
run: make dist
working-directory: ./rust
- name: Archive Rust dist
uses: actions/upload-artifact@v4
with:
name: rust-${{ env.RUST_CHANNEL }}-${{ matrix.rust-targets }}-${{ matrix.xcode-version }}-${{ matrix.os }}
path: ./rust/build/dist/*.xz
- name: Archive target spec
uses: actions/upload-artifact@v4
with:
name: rust-${{ env.RUST_CHANNEL }}-${{ matrix.rust-targets }}-${{ matrix.xcode-version }}-spec
path: ./*.json