From ac33991767d23bacb572d026038ccf4b4d19c3ec Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:45:41 +0200 Subject: [PATCH] ci: run ext*-depending builds in tmpfs This puts the Nix builds requiring a non-ext filesystem into a tmpfs. This is a workaround until the upstream bug is reported and resolved to / in fakeroot. --- .github/actions/nix_tmpfs/action.yml | 13 +++++++++++++ .github/workflows/e2e_openssl.yml | 1 + .github/workflows/e2e_policy.yml | 1 + .github/workflows/e2e_regression.yml | 1 + .github/workflows/e2e_servicemesh.yml | 3 ++- 5 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .github/actions/nix_tmpfs/action.yml diff --git a/.github/actions/nix_tmpfs/action.yml b/.github/actions/nix_tmpfs/action.yml new file mode 100644 index 0000000000..1b194cfd74 --- /dev/null +++ b/.github/actions/nix_tmpfs/action.yml @@ -0,0 +1,13 @@ +name: use tmpfs for nix builds +description: Set Nix' build directory to a tmpfs to fix builds that don't work in the runner-provisioned ext2/ext3 filesystem + +runs: + using: "composite" + steps: + - name: use tmpfs for nix builds + shell: bash + run: | + sudo mkdir -p /etc/systemd/system/nix-daemon.service.d + echo -e "[Service]\nEnvironment=TMPDIR=/dev/shm" | sudo tee /etc/systemd/system/nix-daemon.service.d/tmpfs.conf + sudo systemctl daemon-reload + sudo systemctl restart nix-daemon diff --git a/.github/workflows/e2e_openssl.yml b/.github/workflows/e2e_openssl.yml index 343e4e2a60..294c29457f 100644 --- a/.github/workflows/e2e_openssl.yml +++ b/.github/workflows/e2e_openssl.yml @@ -59,6 +59,7 @@ 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 diff --git a/.github/workflows/e2e_policy.yml b/.github/workflows/e2e_policy.yml index 53990fe7c5..19a1e379b2 100644 --- a/.github/workflows/e2e_policy.yml +++ b/.github/workflows/e2e_policy.yml @@ -59,6 +59,7 @@ 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 diff --git a/.github/workflows/e2e_regression.yml b/.github/workflows/e2e_regression.yml index 741537dd2b..3716522f9a 100644 --- a/.github/workflows/e2e_regression.yml +++ b/.github/workflows/e2e_regression.yml @@ -58,6 +58,7 @@ 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 diff --git a/.github/workflows/e2e_servicemesh.yml b/.github/workflows/e2e_servicemesh.yml index 7af86572c1..1d5b64604e 100644 --- a/.github/workflows/e2e_servicemesh.yml +++ b/.github/workflows/e2e_servicemesh.yml @@ -53,12 +53,13 @@ jobs: - name: Get credentials for CI cluster run: | just get-credentials - - name: Set sync environemnt + - name: Set sync environment run: | sync_ip=$(kubectl get svc sync -o jsonpath='{.status.loadBalancer.ingress[0].ip}') 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