Skip to content

Commit a9b7993

Browse files
committed
re-generate commons
1 parent e2aafee commit a9b7993

File tree

8 files changed

+186
-12
lines changed

8 files changed

+186
-12
lines changed

.github/workflows/build-darwin-arm64.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
darwin-arm64-build:
7070
name: 'darwin-arm64 riscv-none-elf-gcc ${{github.event.inputs.version}} build'
7171
timeout-minutes: 2880 # 2 days
72-
runs-on: macos-15
72+
runs-on: [self-hosted, macos, apple]
7373
env:
7474
XBB_ENVIRONMENT_MACOSX_DEPLOYMENT_TARGET: '11.0'
7575
steps:
@@ -162,6 +162,10 @@ jobs:
162162
tag: 'test'
163163
token: ${{secrets.PUBLISH_TOKEN}}
164164

165+
- name: 'Rename working area'
166+
# For just in case absolute paths remain unprocessed.
167+
run: mv -v build-assets/build build-assets/build-$(date -u +%Y%m%d-%H%M%S)
168+
165169
darwin-arm64-test:
166170
name: 'darwin-arm64 riscv-none-elf-gcc ${{github.event.inputs.version}} test'
167171
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
@@ -176,6 +180,7 @@ jobs:
176180
df -gH /
177181
ls -lA /Library/Developer/CommandLineTools/SDKs || true
178182
ls -lA /Applications
183+
sudo xcode-select --switch /Applications/Xcode_16.4.app
179184
xcode-select --print-path
180185
xcodebuild -version || true
181186
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables || true

.github/workflows/build-darwin-x64.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
darwin-x64-build:
7070
name: 'darwin-x64 riscv-none-elf-gcc ${{github.event.inputs.version}} build'
7171
timeout-minutes: 2880 # 2 days
72-
runs-on: macos-15-intel
72+
runs-on: [self-hosted, macos, intel]
7373
env:
7474
XBB_ENVIRONMENT_MACOSX_DEPLOYMENT_TARGET: '11.0'
7575
steps:
@@ -162,6 +162,10 @@ jobs:
162162
tag: 'test'
163163
token: ${{secrets.PUBLISH_TOKEN}}
164164

165+
- name: 'Rename working area'
166+
# For just in case absolute paths remain unprocessed.
167+
run: mv -v build-assets/build build-assets/build-$(date -u +%Y%m%d-%H%M%S)
168+
165169
darwin-x64-test:
166170
name: 'darwin-x64 riscv-none-elf-gcc ${{github.event.inputs.version}} test'
167171
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
@@ -176,6 +180,7 @@ jobs:
176180
df -gH /
177181
ls -lA /Library/Developer/CommandLineTools/SDKs || true
178182
ls -lA /Applications
183+
sudo xcode-select --switch /Applications/Xcode_16.4.app
179184
xcode-select --print-path
180185
xcodebuild -version || true
181186
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables || true

.github/workflows/build-linux-arm64.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
linux-arm64-build:
7070
name: 'linux-arm64 riscv-none-elf-gcc ${{github.event.inputs.version}} build'
7171
timeout-minutes: 2880 # 2 days
72-
runs-on: ubuntu-24.04-arm
72+
runs-on: [self-hosted, linux, arm64, xbbla, xbblax]
7373
defaults:
7474
run:
7575
shell: bash
@@ -96,6 +96,11 @@ jobs:
9696
echo "$(which npm): $(npm --version)"
9797
echo "$(which xpm): $(xpm --version)"
9898
99+
- name: 'Clean working area' # Mandatory for self-hosted runners.
100+
run: |
101+
chmod -Rf a+w * || true
102+
rm -rf * .git*
103+
99104
- name: 'Checkout project'
100105
uses: actions/checkout@v1 # v1 for old Git
101106
with:
@@ -140,6 +145,10 @@ jobs:
140145
tag: 'test'
141146
token: ${{secrets.PUBLISH_TOKEN}}
142147

148+
- name: 'Rename working area'
149+
# For just in case absolute paths remain unprocessed.
150+
run: echo mv -v build-assets/build build-assets/build-$(date -u +%Y%m%d-%H%M%S)
151+
143152
linux-arm64-test:
144153
name: 'linux-arm64 riscv-none-elf-gcc ${{github.event.inputs.version}} test'
145154
runs-on: ubuntu-24.04-arm

.github/workflows/build-linux-x64.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
linux-x64-build:
7070
name: 'linux-x64 riscv-none-elf-gcc ${{github.event.inputs.version}} build'
7171
timeout-minutes: 2880 # 2 days
72-
runs-on: ubuntu-24.04
72+
runs-on: [self-hosted, linux, x64, xbblix]
7373
defaults:
7474
run:
7575
shell: bash
@@ -96,6 +96,11 @@ jobs:
9696
echo "$(which npm): $(npm --version)"
9797
echo "$(which xpm): $(xpm --version)"
9898
99+
- name: 'Clean working area' # Mandatory for self-hosted runners.
100+
run: |
101+
chmod -Rf a+w * || true
102+
rm -rf * .git*
103+
99104
- name: 'Checkout project'
100105
uses: actions/checkout@v1 # v1 for old Git
101106
with:
@@ -140,6 +145,10 @@ jobs:
140145
tag: 'test'
141146
token: ${{secrets.PUBLISH_TOKEN}}
142147

148+
- name: 'Rename working area'
149+
# For just in case absolute paths remain unprocessed.
150+
run: echo mv -v build-assets/build build-assets/build-$(date -u +%Y%m%d-%H%M%S)
151+
143152
linux-x64-test:
144153
name: 'linux-x64 riscv-none-elf-gcc ${{github.event.inputs.version}} test'
145154
runs-on: ubuntu-24.04

.github/workflows/build-win32-x64.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
win32-x64-build:
7070
name: 'win32-x64 riscv-none-elf-gcc ${{github.event.inputs.version}} build'
7171
timeout-minutes: 2880 # 2 days
72-
runs-on: ubuntu-24.04
72+
runs-on: [self-hosted, linux, x64, xbbliw]
7373
defaults:
7474
run:
7575
shell: bash
@@ -96,6 +96,11 @@ jobs:
9696
echo "$(which npm): $(npm --version)"
9797
echo "$(which xpm): $(xpm --version)"
9898
99+
- name: 'Clean working area' # Mandatory for self-hosted runners.
100+
run: |
101+
chmod -Rf a+w * || true
102+
rm -rf * .git*
103+
99104
- name: 'Checkout project'
100105
uses: actions/checkout@v1 # v1 for old Git
101106
with:
@@ -140,6 +145,10 @@ jobs:
140145
tag: 'test'
141146
token: ${{secrets.PUBLISH_TOKEN}}
142147

148+
- name: 'Rename working area'
149+
# For just in case absolute paths remain unprocessed.
150+
run: echo mv -v build-assets/build build-assets/build-$(date -u +%Y%m%d-%H%M%S)
151+
143152
win32-x64-test:
144153
name: 'win32-x64 riscv-none-elf-gcc ${{github.event.inputs.version}} test'
145154
runs-on: windows-2025

.github/workflows/test-prime.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ jobs:
114114
115115
- name: 'Remove Homebrew'
116116
uses: xpack/remove-homebrew-action@v1
117+
- name: 'Clean working area' # Mandatory for self-hosted runners.
118+
run: |
119+
chmod -Rf a+w * || true
120+
rm -rf * .git*
117121
118122
# https://github.com/actions/checkout
119123
- name: 'Checkout project'
@@ -161,6 +165,11 @@ jobs:
161165
- name: 'Remove Homebrew'
162166
uses: xpack/remove-homebrew-action@v1
163167

168+
- name: 'Clean working area' # Mandatory for self-hosted runners.
169+
run: |
170+
chmod -Rf a+w * || true
171+
rm -rf * .git*
172+
164173
# https://github.com/actions/checkout
165174
- name: 'Checkout project'
166175
uses: actions/checkout@v5

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"upstreamDescriptiveName": "GNU RISC-V Embedded GCC",
109109
"permalinkName": "riscv-none-elf-gcc",
110110
"skipCiTests": "true",
111-
"useSelfHostedRunners": "false"
111+
"useSelfHostedRunners": "true"
112112
},
113113
"engines": {
114114
"node": " >=20.0"

website/docs/maintainer/_common/_content.mdx

Lines changed: 134 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,19 @@ triggered via the VS Code graphical interface, utilising the
154154

155155
<ProjectPatches/>
156156

157+
### Restart the Docker daemons
158+
159+
If, for any reason, the Docker builds need to be cancelled, it is very
160+
likely that some processes will continue to execute in the background.
161+
162+
To completely terminate them, and ensure that Docker executes
163+
from a clean slate, restart the Docker daemons on all GNU/Linux
164+
machines:
165+
166+
```sh
167+
sudo systemctl restart docker
168+
```
169+
157170
### Verify if both projects are pushed
158171

159172
Verify that both the **current project** and the **helper** are
@@ -330,7 +343,71 @@ place them in the XBB cache (`Work/cache`) and restart the build.
330343

331344
## Execute the production builds
332345

333-
The automation is provided by GitHub Actions on GitHub-hosted runners.
346+
The automation is provided by GitHub Actions and three self-hosted runners
347+
(the GitHub hosted runners do not have the necessary resources).
348+
349+
### Start the self-hosted runners
350+
351+
If the runners have expired (more than 2 weeks since last use), execute the
352+
`github-runner-configure.sh` script to reconfigure them. This script
353+
is available in the `xbb-helper` and
354+
requires `GITHUB_API_XPACK_DEV_TOOLS_RUNNERS_TOKEN` to be present.
355+
356+
- On the development machine (`wksi`) open
357+
SSH sessions to the build machines (`xbbli`, `xbbmi`, `xbbma`, `ampere`):
358+
359+
```sh
360+
caffeinate ssh xbbli
361+
caffeinate ssh xbbmi
362+
caffeinate ssh xbbma
363+
caffeinate ssh ampere
364+
```
365+
366+
Create a `screen` session, to provide a persistent standard output for
367+
the runners:
368+
369+
```sh
370+
screen -S ga
371+
```
372+
373+
To exit it, use `# Ctrl-a Ctrl-d`.
374+
375+
For `xbbli` & `ampere`, which have additional memory, start two runners:
376+
377+
```sh
378+
~/actions-runners/xpack-dev-tools/1/run.sh &
379+
~/actions-runners/xpack-dev-tools/2/run.sh &
380+
```
381+
382+
For the macOS x64 runners, ensure the deployment target is defined:
383+
384+
```sh
385+
unset WORK_FOLDER_PATH
386+
export XBB_ENVIRONMENT_MACOSX_DEPLOYMENT_TARGET="11.0"
387+
~/actions-runners/xpack-dev-tools/run.sh &
388+
```
389+
390+
On all other machines, start the runner with:
391+
392+
```sh
393+
~/actions-runners/xpack-dev-tools/run.sh &
394+
```
395+
396+
To check the status of the runners locally:
397+
398+
```sh
399+
ps -a | grep 'Runner.Listener'
400+
```
401+
402+
To terminate them:
403+
404+
```sh
405+
killall Runner.Listener
406+
```
407+
408+
### Check the status of the runners
409+
410+
The status of all self-hosted runners is available at the [GitHub Runners](https://github.com/organizations/xpack-dev-tools/settings/actions/runners) page.
334411

335412
### Publish the helper
336413

@@ -343,6 +420,49 @@ to `"@xpack-dev-tools/xbb-helper":`.
343420

344421
<CommonGenerateTopCommons />
345422

423+
### Check for disk space
424+
425+
Verify that the build machines have sufficient free space and perform
426+
cleanup operations as necessary:
427+
428+
```sh
429+
xpm run check-space -C ~/Work/xpack-dev-tools/riscv-none-elf-gcc-xpack.git/build-assets
430+
```
431+
432+
This is equivalent to executing a `df` command.
433+
434+
<Tabs groupId="operating-systems">
435+
436+
<TabItem value="macos" label="macOS">
437+
438+
```
439+
df -gH /
440+
```
441+
442+
</TabItem>
443+
444+
<TabItem value="linux" label="GNU/Linux">
445+
446+
```sh
447+
df -BG -H /
448+
```
449+
450+
</TabItem>
451+
452+
</Tabs>
453+
454+
To free the space utilised by all previous builds of all `xpack-dev-tools` packages:
455+
456+
```sh
457+
xpm run clear-all-projects-builds -C ~/Work/xpack-dev-tools/riscv-none-elf-gcc-xpack.git/build-assets
458+
```
459+
460+
This is equivalent to executing a comprehensive `rm` to remove the `build` folders:
461+
462+
```sh
463+
rm -rf ~/Work/xpack-dev-tools/*/build-assets/build
464+
```
465+
346466
### Commit and push
347467

348468
- **Push** the `xpack-development` branch to GitHub
@@ -439,11 +559,6 @@ xpm run install -C ~/Work/xpack-dev-tools/riscv-none-elf-gcc-xpack.git/build-ass
439559
xpm run test-pre-release -C ~/Work/xpack-dev-tools/riscv-none-elf-gcc-xpack.git/build-assets
440560
```
441561

442-
:::caution
443-
Since the builds were performed on the latest GitHub macOS runners,
444-
it is strongly recommended to also execute the tests on an older macOS 11 machine.
445-
:::
446-
447562
For additional tests, on each platform,
448563
download the archive from
449564
[pre-releases/test](https://github.com/xpack-dev-tools/pre-releases/releases/tag/test/)
@@ -566,6 +681,19 @@ The test results are available from the
566681
- Navigate to https://github.com/xpack-dev-tools/pre-releases/releases/tag/test/
567682
- Remove the test binaries
568683

684+
### Clean the work area
685+
686+
Execute the **trigger-workflow-deep-clean** xpm action:
687+
688+
```sh
689+
xpm run trigger-workflow-deep-clean -C ~/Work/xpack-dev-tools/riscv-none-elf-gcc-xpack.git/build-assets
690+
```
691+
692+
This will remove the build folders on all self-hosted runners.
693+
694+
The results are available from the
695+
[GitHub Actions](https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/actions) page.
696+
569697
<CommonCloseOpenIssues />
570698

571699
<CommonShareOnTwitter />

0 commit comments

Comments
 (0)