Skip to content

Commit 130640a

Browse files
MaisenbacherDigaw
authored andcommitted
CI: move to self-hosted GitHub ARC infrastructure
We are now running the self-hosted testing infrastructure with the help of GitHub's ARC. This allows us to be more considerate with the available resources as the VMs are now spawned on demand with the requested kernel. For now, we have to print KERNEL_VERSION in a previous job to pick up the correct kernel. This should be fixed in the future by contributing a labeling mechanism to GitHub's ARC. Signed-off-by: Dennis Maisenbacher <[email protected]>
1 parent f70579e commit 130640a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/run-nightly-tests.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,28 @@ on:
77
- cron: '0 01 * * *'
88

99
jobs:
10+
request-kernel-version:
11+
if: github.repository == 'linux-nvme/nvme-cli'
12+
runs-on: ubuntu-latest
13+
steps:
14+
#We don't have to build the kernel here, as we have a cron job running on
15+
#the k8s cluster that builds this target nightly.
16+
- name: Request nightly Linus' master tree kernel build for the next job
17+
run: |
18+
echo "KERNEL_VERSION=linus-master" >> $GITHUB_ENV
19+
- name: Notifying the next job to pick up the correct kernel tag
20+
run: |
21+
echo "${KERNEL_VERSION}"
1022
nightly-tests:
11-
runs-on: nvme-nvm
1223
if: github.repository == 'linux-nvme/nvme-cli'
24+
runs-on: arc-vm-runner-set
25+
needs: request-kernel-version
1326
container:
1427
image: ghcr.io/linux-nvme/debian.python:latest
1528
#Expose all devices to the container through the `privileged` flag.
1629
#
1730
#BDEV0 is an environment variable of the self-hosted runner instance
18-
#that contains a valid nvme ctrl name which is capable of the nvm
31+
#that contains a valid nvme namespace which is capable of the nvm
1932
#command set.
2033
options: '--privileged -v "/dev":"/dev":z -e BDEV0'
2134
steps:
@@ -31,11 +44,11 @@ jobs:
3144
scripts/build.sh -b release -c gcc
3245
- name: Overwrite test config
3346
run: |
34-
CONTROLLER=$(echo /dev/${BDEV0} | sed 's/n[0-9]*$//')
47+
CONTROLLER=$(echo ${BDEV0} | sed 's/n[0-9]*$//')
3548
cat > tests/config.json << EOF
3649
{
3750
"controller" : "$CONTROLLER",
38-
"ns1": "/dev/${BDEV0}",
51+
"ns1": "${BDEV0}",
3952
"log_dir": "tests/nvmetests/",
4053
"nvme_bin": "$(pwd)/.build-ci/nvme"
4154
}

0 commit comments

Comments
 (0)