From 6ff9fcc2c0f14c49cd62472eb2cf8370a3c35cd1 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Tue, 16 May 2023 13:44:40 +0000 Subject: [PATCH] ci: switch to github actions build --- .github/workflows/e2e.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ed3c288..7ebe57d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -39,6 +39,11 @@ jobs: ] steps: + - uses: actions/checkout@v1 + + - name: Build + run: go build + - uses: digitalocean/action-doctl@v2 with: token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} @@ -73,10 +78,15 @@ jobs: sleep 1s done - ssh root@$IP "curl -L https://nixos.org/nix/install | sh -s -- --daemon" - ssh root@$IP "echo 'experimental-features = nix-command flakes' >> /etc/nix/nix.conf" + ssh root@$IP "systemctl disable apt-daily.timer apt-daily-upgrade.timer" + ssh root@$IP "systemctl stop apt-daily.service apt-daily-upgrade.service" + + ssh root@$IP "apt-get install -y podman qemu-system-x86" + ssh root@$IP "useradd --shell /bin/bash user && mkdir -p /home/user/.ssh && cp /root/.ssh/authorized_keys /home/user/.ssh/ && chown -R user:user /home/user" + scp ./out-of-tree root@$IP:/usr/local/bin/ + echo 'name = "out-of-tree script"' >> .out-of-tree.toml echo 'type = "script"' >> .out-of-tree.toml echo 'script = "script.sh"' >> .out-of-tree.toml @@ -88,11 +98,9 @@ jobs: scp .out-of-tree.toml script.sh user@$IP: - ssh user@$IP "mkdir -p ~/.config/containers && echo 'unqualified-search-registries = ["docker.io"]' > ~/.config/containers/registries.conf" - - ssh user@$IP "source /etc/profile.d/nix.sh; nix run github:out-of-tree/out-of-tree/$GITHUB_SHA -- --log-level=debug kernel list-remote --distro=${{ matrix.os.distro }} --ver=${{ matrix.os.release }}" - ssh user@$IP "source /etc/profile.d/nix.sh; nix run github:out-of-tree/out-of-tree/$GITHUB_SHA -- --log-level=debug kernel autogen --max=1 --shuffle" - ssh user@$IP "source /etc/profile.d/nix.sh; nix run github:out-of-tree/out-of-tree/$GITHUB_SHA -- --log-level=debug pew --qemu-timeout=10m" + ssh user@$IP "out-of-tree --log-level=debug kernel list-remote --distro=${{ matrix.os.distro }} --ver=${{ matrix.os.release }}" + ssh user@$IP "out-of-tree --log-level=debug kernel autogen --max=1 --shuffle" + ssh user@$IP "out-of-tree --log-level=debug pew --qemu-timeout=10m" scp -r user@$IP:.out-of-tree/logs .