-
Notifications
You must be signed in to change notification settings - Fork 12
154 lines (144 loc) · 4.88 KB
/
selfbuild.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
149
150
151
152
153
154
name: Self-Build
on:
pull_request:
jobs:
self-build-with-build-version:
name: Self-Build-With-build-version
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- target_arch: x86_64-pc-windows-msvc
os: windows-latest
- target_arch: aarch64-pc-windows-msvc
os: windows-latest
- target_arch: x86_64-apple-darwin
os: macos-latest
- target_arch: aarch64-apple-darwin
os: macos-latest
- target_arch: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: armv7-unknown-linux-gnueabihf
os: ubuntu-20.04
- target_arch: armv7-unknown-linux-musleabihf
os: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install latest rust
run: rustup toolchain install stable --no-self-update --profile minimal
- name: Build Thyself
env:
TARGET_ARCH: ${{ matrix.target_arch }}
run: |
set -euxo pipefail
VERSION="$(
curl \
--user-agent "cargo-quickinstall build pipeline ([email protected])" \
--fail "https://crates.io/api/v1/crates/cargo-quickinstall" \
| jq -r '.crate|.max_stable_version'
)"
VERSION="$VERSION" ./build-version.sh cargo-quickinstall
ALWAYS_BUILD=1 VERSION="$VERSION" ./build-version.sh cargo-quickinstall
self-build:
name: Self-Build
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- target_arch: x86_64-pc-windows-msvc
os: windows-latest
- target_arch: x86_64-apple-darwin
os: macos-latest
- target_arch: aarch64-apple-darwin
os: macos-latest
- target_arch: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-gnu
os: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install latest rust
run: rustup toolchain install stable --no-self-update --profile minimal
- name: Install Thyself
run: cargo install --path cargo-quickinstall
- name: Install Thyself with Thyself (or fallback to sensei on windows)
run: cargo quickinstall cargo-quickinstall || cargo quickinstall sensei
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-needing-cc:
name: Build package that needs CC
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- target_arch: x86_64-pc-windows-msvc
os: windows-latest
- target_arch: armv7-unknown-linux-gnueabihf
os: ubuntu-20.04
- target_arch: armv7-unknown-linux-musleabihf
os: ubuntu-20.04
- target_arch: x86_64-apple-darwin
os: macos-latest
- target_arch: aarch64-apple-darwin
os: macos-latest
- target_arch: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-musl
os: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install latest rust
run: rustup toolchain install stable --no-self-update --profile minimal
# FIXME: find a package that needs a working CC but doesn't take quite so long to build.
- name: Build cargo-deny
env:
TARGET_ARCH: ${{ matrix.target_arch }}
run: |
set -euxo pipefail
touch .env
VERSION="$(
curl \
--user-agent "cargo-quickinstall build pipeline ([email protected])" \
--fail "https://crates.io/api/v1/crates/cargo-deny" \
| jq -r '.crate|.max_stable_version'
)"
ALWAYS_BUILD=1 VERSION="$VERSION" TARGET_ARCH="$TARGET_ARCH" ./build-version.sh cargo-deny
build-package-test:
name: Build package test
uses: ./.github/workflows/build-package.yml
secrets: inherit
with:
crate: cargo-quickinstall
version: 0.2.9
target_arch: x86_64-unknown-linux-gnu
build_os: ubuntu-latest
branch: ${{ github.head_ref }}
always_build: 1
skip_upload: true