Skip to content

CI-HW

CI-HW #30

Workflow file for this run

name: CI-HW
concurrency:
group: ci-hw-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- master
- release/*
tags:
- "v*"
pull_request:
types: [ labeled ]
schedule:
- cron: "0 10 * * *" # ~2am PST
workflow_dispatch:
inputs:
keep:
type: boolean
description: "Don't exit when done"
required: false
default: false
skip_ready:
type: boolean
description: "Skip ready checks"
required: false
default: false
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
jobs:
hlab:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci-hw')
runs-on: hlab
timeout-minutes: 600
strategy:
fail-fast: false
matrix:
include:
- fabricmode: spine-leaf
includeonie: true
buildmode: iso
steps:
- name: Runner host
run: |
echo "$KUBE_NODE"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout lab-ci repository
uses: actions/checkout@v4
with:
repository: githedgehog/lab-ci
path: './lab-ci'
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: true
- name: Setup local registry
run: |
just --timestamp _localreg &
- name: Build hhfab
run: |
just --timestamp oci_repo=127.0.0.1:30000 oci=http push
- name: hhfab init and vlab up
env:
HHFAB_REG_REPO: 127.0.0.1:30000
run: |
source "./lab-ci/envs/$KUBE_NODE/source.sh"
bin/hhfab init -v --dev --include-onie=${{ matrix.includeonie }} -w "./lab-ci/envs/$KUBE_NODE/wiring.yaml"
bin/hhfab vlab up -v --ready switch-reinstall ${{ inputs.skip_ready && '' || '--ready setup-vpcs --ready test-connectivity' }} ${{ inputs.keep && '' || '--ready exit' }} --mode=${{ matrix.buildmode }}
- name: Dump local registry logs
if: ${{ always() }}
run: |
cat .zot/log
- name: Setup tmate session for debug
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 600
with:
limit-access-to-actor: true