Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
code/.github/workflows/rusty-v8-release.yml at main · zimushui/code · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
zimushui
code
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
code
/
.github
/
workflows
/
rusty-v8-release.yml
Copy path
View runs
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
204 lines (175 loc) · 6.18 KB
main
Breadcrumbs
code
/
.github
/
workflows
/
rusty-v8-release.yml
Copy path
Top
File metadata and controls
Code
Blame
204 lines (175 loc) · 6.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
name
:
rusty-v8-release
on
:
workflow_dispatch
:
inputs
:
release_tag
:
description
:
Optional release tag. Defaults to rusty-v8-v<resolved_v8_version>.
required
:
false
type
:
string
publish
:
description
:
Publish the staged musl artifacts to a GitHub release.
required
:
false
default
:
true
type
:
boolean
concurrency
:
group
:
${{ github.workflow }}::${{ inputs.release_tag || github.run_id }}
cancel-in-progress
:
false
permissions
:
contents
:
read
jobs
:
metadata
:
runs-on
:
ubuntu-latest
outputs
:
release_tag
:
${{ steps.release_tag.outputs.release_tag }}
v8_version
:
${{ steps.v8_version.outputs.version }}
steps
:
-
uses
:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
#
v6
-
name
:
Set up Python
uses
:
actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
#
v6
with
:
python-version
:
"
3.12
"
-
name
:
Resolve exact v8 crate version
id
:
v8_version
shell
:
bash
run
:
|
set -euo pipefail
version="$(python3 .github/scripts/rusty_v8_bazel.py resolved-v8-crate-version)"
echo "version=${version}" >> "$GITHUB_OUTPUT"
-
name
:
Resolve release tag
id
:
release_tag
env
:
RELEASE_TAG_INPUT
:
${{ inputs.release_tag }}
V8_VERSION
:
${{ steps.v8_version.outputs.version }}
shell
:
bash
run
:
|
set -euo pipefail
release_tag="${RELEASE_TAG_INPUT}"
if [[ -z "${release_tag}" ]]; then
release_tag="rusty-v8-v${V8_VERSION}"
fi
echo "release_tag=${release_tag}" >> "$GITHUB_OUTPUT"
build
:
name
:
Build ${{ matrix.target }}
needs
:
metadata
runs-on
:
${{ matrix.runner }}
permissions
:
contents
:
read
actions
:
read
strategy
:
fail-fast
:
false
matrix
:
include
:
-
runner
:
ubuntu-24.04
platform
:
linux_amd64_musl
target
:
x86_64-unknown-linux-musl
-
runner
:
ubuntu-24.04-arm
platform
:
linux_arm64_musl
target
:
aarch64-unknown-linux-musl
steps
:
-
uses
:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
#
v6
-
name
:
Set up Bazel
uses
:
bazelbuild/setup-bazelisk@6ecf4fd8b7d1f9721785f1dd656a689acf9add47
#
v3
-
name
:
Set up Python
uses
:
actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
#
v6
with
:
python-version
:
"
3.12
"
-
name
:
Build Bazel V8 release pair
env
:
BUILDBUDDY_API_KEY
:
${{ secrets.BUILDBUDDY_API_KEY }}
PLATFORM
:
${{ matrix.platform }}
TARGET
:
${{ matrix.target }}
shell
:
bash
run
:
|
set -euo pipefail
target_suffix="${TARGET//-/_}"
pair_target="//third_party/v8:rusty_v8_release_pair_${target_suffix}"
extra_targets=()
if [[ "${TARGET}" == *-unknown-linux-musl ]]; then
extra_targets=(
"@llvm//runtimes/libcxx:libcxx.static"
"@llvm//runtimes/libcxx:libcxxabi.static"
)
fi
bazel_args=(
build
-c
opt
"--platforms=@llvm//platforms:${PLATFORM}"
"${pair_target}"
"${extra_targets[@]}"
--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)
)
bazel_startup_flags=(
--noexperimental_remote_repo_contents_cache
)
bazel_extra_args=()
if [[ -n "${BUILDBUDDY_API_KEY}" ]]; then
bazel_startup_flags+=(--bazelrc=.github/workflows/v8-ci.bazelrc)
bazel_extra_args+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
else
bazel_extra_args+=(
--remote_executor=
--remote_cache=
--bes_backend=
--bes_results_url=
)
fi
bazel "${bazel_startup_flags[@]}" "${bazel_args[@]}" "${bazel_extra_args[@]}"
-
name
:
Stage release pair
env
:
PLATFORM
:
${{ matrix.platform }}
TARGET
:
${{ matrix.target }}
shell
:
bash
run
:
|
set -euo pipefail
python3 .github/scripts/rusty_v8_bazel.py stage-release-pair \
--platform "${PLATFORM}" \
--target "${TARGET}" \
--compilation-mode opt \
--output-dir "dist/${TARGET}"
-
name
:
Upload staged musl artifacts
uses
:
actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
#
v7
with
:
name
:
rusty-v8-${{ needs.metadata.outputs.v8_version }}-${{ matrix.target }}
path
:
dist/${{ matrix.target }}/*
publish-release
:
if
:
${{ inputs.publish }}
needs
:
-
metadata
-
build
runs-on
:
ubuntu-latest
permissions
:
contents
:
write
actions
:
read
steps
:
-
name
:
Ensure publishing from default branch
if
:
${{ github.ref_name != github.event.repository.default_branch }}
env
:
DEFAULT_BRANCH
:
${{ github.event.repository.default_branch }}
shell
:
bash
run
:
|
set -euo pipefail
echo "Publishing is only allowed from ${DEFAULT_BRANCH}; current ref is ${GITHUB_REF_NAME}." >&2
exit 1
-
name
:
Ensure release tag is new
env
:
GH_TOKEN
:
${{ github.token }}
RELEASE_TAG
:
${{ needs.metadata.outputs.release_tag }}
shell
:
bash
run
:
|
set -euo pipefail
if gh release view "${RELEASE_TAG}" --repo "${GITHUB_REPOSITORY}" > /dev/null 2>&1; then
echo "Release tag ${RELEASE_TAG} already exists; musl artifact tags are immutable." >&2
exit 1
fi
-
uses
:
actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
#
v8
with
:
path
:
dist
-
name
:
Create GitHub Release
uses
:
softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe
#
v2
with
:
tag_name
:
${{ needs.metadata.outputs.release_tag }}
name
:
${{ needs.metadata.outputs.release_tag }}
files
:
dist/**
#
Keep V8 artifact releases out of Codex's normal "latest release" channel.
prerelease
:
true
You can’t perform that action at this time.