-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
208 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,6 @@ untgz/ by Pedro A. Aranda Gutierrez <[email protected]> | |
vstudio/ by Gilles Vollant <[email protected]> | ||
Building a minizip-enhanced zlib with Microsoft Visual Studio | ||
Includes vc11 from kreuzerkrieg and vc12 from davispuh | ||
|
||
s390x/ by Eduard Stefes <[email protected]> | ||
Scripts to create S390X github action workers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# General Notes | ||
|
||
> [!NOTE] | ||
> This is a modified and simplified copy of the s390x self-hosted action runner scripts from here: | ||
> - https://github.com/zlib-ng/zlib-ng/tree/a0fa24710c8faa1a746a20cfd5c7c24571e15ca4/arch/s390/self-hosted-builder | ||
> - https://github.com/anup-kodlekere/gaplib | ||
> | ||
> **This code does NOT setup ephemeral workers!!**. It means that the worker context will be reused between CI runs and never be destroyed. | ||
> | ||
> The implications are: | ||
> - one needs to check a PR that does not leak the /etc/actions_runner_conf | ||
> - one needs to check a PR that it does not alter the system in a persistent way | ||
> - one needs to check a PR that it does not access any file outside of the build folder | ||
> | ||
> To create ephemeral workers we need to setup a token request process similar like zlib-ng has done. But such a process implies that the worker maintainer needs, not just commit, but administration rights to the repository. | ||
## Self Hosted Runner | ||
|
||
Given complexity of Vector and DFLTCC machine instruction, it is not clear whether QEMU TCG will ever support it. At the time of writing, one has to have access to an IBM z15+ VM or LPAR in order to test the support. Since DFLTCC and Vector instructions are non-privileged, neither special VM/LPAR configuration nor root are required. | ||
|
||
The CI uses a self-hosted builder, provided by marist university. There is no official IBM Z GitHub Actions runner, so we build one inspired by anup-kodlekere/gaplib. Future updates to actions-runner might need an updated patch. The .net version number patch has been separated into a separate file to avoid a need for constantly changing the patch. | ||
|
||
### Setup | ||
|
||
1. request an account at https://linuxone.cloud.marist.edu/#/login and create a VM | ||
2. install podman: | ||
|
||
``` | ||
sudo apt install podman | ||
``` | ||
|
||
3. request an action runner authentication token via the github project website: | ||
``` | ||
Settings->Actions->Runners->New self-hosted runner | ||
``` | ||
4. setup the repo and token in the actions_runner_conf.sh file: | ||
``` | ||
REPO="fneddy/zlib" | ||
TOKEN="AAGXXXXXXXXXXXXXXXXXXXXXXXXXX" | ||
LABEL="S390X" | ||
``` | ||
5. build the action runner container: | ||
``` | ||
podman build --squash -f actions_runner_ubuntu.Dockerfile --tag zlib/actions_runner . | ||
``` | ||
6. start the actions runner via either: | ||
|
||
- directly running it from cli | ||
``` | ||
podman run --rm -it zlib/actions_runner | ||
``` | ||
- let systemd quadlet hooks start it automatically | ||
``` | ||
mkdir -p $HOME/.config/containers/systemd/ | ||
cp actions_runner.container $HOME/.config/containers/systemd/ | ||
systemctl --user daemon-reload | ||
systemctl --user start zlib_actions_runner | ||
sudo -E loginctl enable-linger $USER | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=GitHub Actions Worker for zlib | ||
|
||
[Container] | ||
Image=zlib/actions_runner | ||
|
||
[Install] | ||
WantedBy=multi-user.target default.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# action runner startup script. | ||
# | ||
# Expects the following environment variables: | ||
# | ||
# - REPO=<owner> | ||
# - TOKEN=<***> | ||
# - LABEL=<LABELS for this runner> | ||
# | ||
|
||
set -e -u | ||
source /etc/actions_runner_conf | ||
|
||
# Validate required environment variables | ||
if [ -z "${REPO:-}" ] || [ -z "${TOKEN:-}" ] || [ -z "${LABEL:-}" ]; then | ||
echo "Error: REPO and/or TOKEN and/or LABEL environment variables not found" | ||
exit 1 | ||
fi | ||
|
||
./config.sh \ | ||
--unattended \ | ||
--url "https://github.com/$REPO" \ | ||
--token "$TOKEN" \ | ||
--disableupdate \ | ||
--name "${LABEL}_actions_runner" \ | ||
--replace \ | ||
--labels "$LABEL" | ||
|
||
# Run the actions-runner | ||
./run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
REPO="fneddy/zlib" | ||
TOKEN="AAG..." | ||
LABEL="S390X" |
Oops, something went wrong.