Skip to content

Install EOS metrics tools #18

Install EOS metrics tools

Install EOS metrics tools #18

Workflow file for this run

name: Build filesystem and export to OSTree
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
# https://runs-on.com/configuration/job-labels/
# https://aws.amazon.com/ec2/instance-types/
runs-on:
# x64
- runs-on=${{github.run_id}}/family=m7+c7/cpu=8+16/ram=32+64/image=ubuntu24-full-x64/disk=large/extras=s3-cache
timeout-minutes: 600 # 10 hours
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch secrets from Vault
uses: hashicorp/vault-action@v3
with:
url: https://vault.endlessos.org
method: jwt
path: ghactions
role: endlessm-eos-build-meta
pki: |
pki/issue/endless-client {"common_name": "[email protected]", "ttl": "12h"} ;
- name: Write client certificates
run: |
echo "${ENDLESSCLIENT_CERT}" > client.crt
echo "${ENDLESSCLIENT_CA_CHAIN}" >> client.crt
echo "${ENDLESSCLIENT_KEY}" > client.key
chmod 600 client.key
- name: Install BuildStream and dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
python3-pip python3-venv bubblewrap \
lzip xz-utils bzip2 gzip \
git wget curl \
build-essential pkg-config \
autotools-dev automake autoconf libtool \
cmake ninja-build meson \
flex bison gettext \
libssl-dev libffi-dev \
ostree flatpak-builder
python3 -m venv venv
source venv/bin/activate
pip install BuildStream buildstream-plugins dulwich requests tomlkit
- name: Configure BuildStream
run: |
source venv/bin/activate
mkdir -p ~/.config
cat > ~/.config/buildstream.conf << EOF
# BuildStream user configuration
scheduler:
fetchers: 4
builders: 2
pushers: 2
network-retries: 2
build:
# Allow up to 4 parallel processes to execute within the scope of one build
max-jobs: 4
logging:
key-length: 0
verbose: false
error-lines: 20
message-lines: 20
debug: false
element-format: |
%{state: >12} %{full-key} %{name} %{workspace-dirs}
message-format: |
[%{elapsed}][%{key}][%{element}] %{action} %{message}
# Artifact cache configuration
artifacts:
servers:
- url: https://bstcache.endlessos.org
push: true
auth:
client-cert: $(pwd)/client.crt
client-key: $(pwd)/client.key
EOF
- name: Generate development-only OSTree signing key (temporary)
run: |
make ostree-gpg
- name: Enable unprivileged userns
run: |
source venv/bin/activate
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- uses: runs-on/action@v2
with:
sccache: s3
- uses: mozilla-actions/[email protected]
- name: Build filesystem and export to OSTree repo
run: |
source venv/bin/activate
make files/ostree-config/eos.gpg
bst build eos/repo.bst