Skip to content

Commit

Permalink
ci: use btrfs for all Nix builds
Browse files Browse the repository at this point in the history
Previously, we had to perform specific Nix builds which didn't work on ext*-fileysstems in a tmpfs. Due to the memory constraints in GH Actions runners, this is not feasible for all CI workloads. Therefore, this switches all Nix-using CI to perform Nix builds in a btrfs.
  • Loading branch information
msanft committed Aug 5, 2024
1 parent 8b742d0 commit db2c214
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
13 changes: 0 additions & 13 deletions .github/actions/nix_tmpfs/action.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/actions/setup_nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ runs:
with:
name: edgelesssys
authToken: ${{ inputs.cachixToken }}
- name: use btrfs for nix builds
shell: bash
run: |
sudo mkdir /nixbld
truncate -s 3G btrfs.img
sudo mkfs.btrfs -f btrfs.img
sudo mount btrfs.img /nixbld
sudo mkdir -p /etc/systemd/system/nix-daemon.service.d
echo -e "[Service]\nEnvironment=TMPDIR=/nixbld" | sudo tee /etc/systemd/system/nix-daemon.service.d/btrfs.conf
sudo systemctl daemon-reload
sudo systemctl restart nix-daemon
1 change: 0 additions & 1 deletion .github/workflows/e2e_openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a "$GITHUB_ENV"
sync_uuid=$(kubectl get configmap sync-server-fifo -o jsonpath='{.data.uuid}')
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a "$GITHUB_ENV"
- uses: ./.github/actions/nix_tmpfs
- name: Build and prepare deployments
run: |
just coordinator initializer openssl port-forwarder node-installer
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a "$GITHUB_ENV"
sync_uuid=$(kubectl get configmap sync-server-fifo -o jsonpath='{.data.uuid}')
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a "$GITHUB_ENV"
- uses: ./.github/actions/nix_tmpfs
- name: Build and prepare deployments
run: |
just coordinator initializer openssl port-forwarder node-installer
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
- name: Get credentials for CI cluster
run: |
just get-credentials
- uses: ./.github/actions/nix_tmpfs
- name: Build and prepare deployments
run: |
just node-installer
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e_servicemesh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a "$GITHUB_ENV"
sync_uuid=$(kubectl get configmap sync-server-fifo -o jsonpath='{.data.uuid}')
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a "$GITHUB_ENV"
- uses: ./.github/actions/nix_tmpfs
- name: Build and prepare deployments
run: |
just coordinator initializer port-forwarder service-mesh-proxy node-installer
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 25
steps:
# This job needs quite some space, so we remove some unnecessary things.
- uses: easimon/maximize-build-space@fc881a613ad2a34aca9c9624518214ebc21dfc0c # v10
with:
root-reserve-mb: 20000
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
Expand Down

0 comments on commit db2c214

Please sign in to comment.