Skip to content

Commit

Permalink
Switch to self-hosted runner
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Aug 30, 2023
1 parent f0f35f1 commit f5f7997
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/flavors-arm.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
{
"flavor": "ubuntu-20-lts-arm-nvidia-jetson-agx-orin",
"model": "none",
"worker": "fast"
"worker": "self-hosted"
}
]
2 changes: 1 addition & 1 deletion .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
- "opensuse-leap"
- "alpine-opensuse-leap"
test-uki:
runs-on: kvm
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Install Go
Expand Down
40 changes: 2 additions & 38 deletions .github/workflows/release-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,26 +118,9 @@ jobs:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Shared runner build 🔧
if: ${{ matrix.worker != 'kvm' }}
- name: Build 🔧
run: |
earthly -P +all-arm -VARIANT=core -MODEL=${{ matrix.model }} -FLAVOR=${{ matrix.flavor }}
- name: Self-hosted runner Build 🔧
if: ${{ matrix.worker == 'kvm' }}
run: |
# Configure earthly to use the docker mirror in CI
# https://docs.earthly.dev/ci-integration/pull-through-cache#configuring-earthly-to-use-the-cache
mkdir -p ~/.earthly/
cat << EOF > ~/.earthly/config.yml
global:
buildkit_additional_config: |
[registry."docker.io"]
mirrors = ["registry.docker-mirror.svc.cluster.local:5000"]
[registry."registry.docker-mirror.svc.cluster.local:5000"]
insecure = true
http = true
EOF
docker run --privileged -v $HOME/.earthly/config.yml:/etc/.earthly/config.yml -v /var/run/docker.sock:/var/run/docker.sock --rm --env EARTHLY_BUILD_ARGS -t -v "$(pwd)":/workspace -v earthly-tmp:/tmp/earthly:rw earthly/earthly:v0.7.5 --allow-privileged +all-arm -VARIANT=core --MODEL=${{ matrix.model }} --FLAVOR=${{ matrix.flavor }}
- name: Convert all json files into a reports.tar.gz file
run: |
export VERSION=$(cat build/VERSION)
Expand Down Expand Up @@ -251,28 +234,9 @@ jobs:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Shared runner build 🔧
if: ${{ matrix.worker != 'kvm' }}
- name: Build 🔧
run: |
earthly -P +all-arm -VARIANT=standard -MODEL=${{ matrix.model }} -K3S_VERSION=${{ matrix.k3s_version }} -FLAVOR=${{ matrix.flavor }}
- name: Self-hosted runner Build 🔧
if: ${{ matrix.worker == 'kvm' }}
run: |
# Configure earthly to use the docker mirror in CI
# https://docs.earthly.dev/ci-integration/pull-through-cache#configuring-earthly-to-use-the-cache
mkdir -p ~/.earthly/
cat << EOF > ~/.earthly/config.yml
global:
buildkit_additional_config: |
[registry."docker.io"]
mirrors = ["registry.docker-mirror.svc.cluster.local:5000"]
[registry."registry.docker-mirror.svc.cluster.local:5000"]
insecure = true
http = true
EOF
docker run --privileged -v $HOME/.earthly/config.yml:/etc/.earthly/config.yml -v /var/run/docker.sock:/var/run/docker.sock --rm --env EARTHLY_BUILD_ARGS -t -v "$(pwd)":/workspace -v earthly-tmp:/tmp/earthly:rw earthly/earthly:v0.7.5 --allow-privileged +all-arm -VARIANT=standard -K3S_VERSION=${{ matrix.k3s_version }} --MODEL=${{ matrix.model }} --FLAVOR=${{ matrix.flavor }}
- name: Convert all json files into a reports.tar.gz file
run: |
export VERSION=$(cat build/VERSION)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
echo "::set-output name=matrix::{\"include\": $content }"
build-framework:
runs-on: kvm
runs-on: self-hosted
needs:
- get-framework-matrix
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build-framework-flavor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: kvm
runs-on: self-hosted
permissions:
id-token: write
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-docker-arm-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
security-events: write
steps:
- name: Release space from worker
if: ${{ inputs.worker != 'fast' }}
if: ${{ inputs.worker != 'self-hosted' }}
run: |
echo "Listing top largest packages"
pkgs=$(dpkg-query -Wf '${Installed-Size}\t${Package}\t${Status}\n' | awk '$NF == "installed"{print $1 "\t" $2}' | sort -nr)
Expand Down Expand Up @@ -84,13 +84,13 @@ jobs:
run: |
echo "IMG_COMPRESSION=xz" >> $GITHUB_ENV
- name: Shared runner build 🔧
if: ${{ inputs.worker != 'fast' }}
if: ${{ inputs.worker != 'self-hosted' }}
run: |
./earthly.sh +all-arm --VARIANT=core --MODEL=${{ inputs.model }} \
--FLAVOR=${{ inputs.flavor }} \
--IMG_COMPRESSION=${{env.IMG_COMPRESSION}}
- name: fast runner Build 🔧
if: ${{ inputs.worker == 'fast' }}
if: ${{ inputs.worker == 'self-hosted' }}
run: |
earthly --allow-privileged +all-arm \
--VARIANT=core --MODEL=${{ inputs.model }} \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-provider-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
test:
runs-on: fast
runs-on: self-hosted
permissions:
id-token: write # OIDC support
contents: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
runs-on: kvm
runs-on: self-hosted

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-qemu-bundles-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
runs-on: kvm
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-qemu-reset-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
runs-on: kvm
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-upgrade-with-cli-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
runs-on: kvm
runs-on: self-hosted
steps:
- name: Release space from worker
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-zfs-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
runs-on: kvm
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Download artifacts
Expand Down

0 comments on commit f5f7997

Please sign in to comment.