From b28977ece4b238387e66264a2f73bd3a2fdc4c58 Mon Sep 17 00:00:00 2001 From: Jacob Carlborg Date: Sat, 17 Feb 2024 07:04:46 +0100 Subject: [PATCH] fixup! Add post run that prints VM output --- .github/workflows/ci.yml | 778 +++++++++++++++++++-------------------- 1 file changed, 389 insertions(+), 389 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eeaa6f..94329b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,374 +9,374 @@ on: - master jobs: - build: # make sure build/ci work properly - runs-on: ubuntu-latest - timeout-minutes: 2 - steps: - - uses: actions/checkout@v4 - - run: npm install - - run: npm run all - - FreeBSD: # make sure the action works on a clean machine without building - name: FreeBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }} - runs-on: ${{ matrix.host.name }} - timeout-minutes: 5 - strategy: - fail-fast: false - matrix: - version: - - '13.2' - - '13.1' - - '13.0' - - '12.4' - - '12.2' - - architecture: - - name: arm64 - - name: x86-64 - uname: amd64 - - host: - - name: ubuntu-latest - # /home is symlinked to /usr/home. pwd will return the resolved path. - work_directory: /usr/home/runner/work/action/action - - - name: macos-latest - work_directory: /Users/runner/work/action/action - - exclude: - - version: '12.2' - architecture: { name: arm64 } - - - architecture: { name: arm64 } - host: { name: macos-latest } - - include: - - version: '14.0' - architecture: { name: arm64 } - host: - name: ubuntu-latest - work_directory: /home/runner/work/action/action - - - version: '14.0' - architecture: - name: x86-64 - uname: amd64 - host: - name: ubuntu-latest - work_directory: /home/runner/work/action/action - - - version: '14.0' - architecture: - name: x86-64 - uname: amd64 - host: - name: macos-latest - work_directory: /Users/runner/work/action/action - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: test - uses: ./.github/workflows/support/test - with: - name: FreeBSD - architecture: ${{ matrix.architecture.name }} - version: ${{ matrix.version }} - uname_release: ${{ matrix.version}}-RELEASE - uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }} - work_directory: ${{ matrix.host.work_directory }} - - OpenBSD: - name: OpenBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }} - runs-on: ${{ matrix.host.name }} - timeout-minutes: 5 - strategy: - fail-fast: false - matrix: - version: - - '7.4' - - '7.3' - - '7.2' - - '7.1' - - '6.9' - - '6.8' - - architecture: - - name: arm64 - - name: x86-64 - uname: amd64 - - host: - - name: ubuntu-latest - work_directory: /home/runner/work/action/action - - - name: macos-latest - work_directory: /Users/runner/work/action/action - - exclude: - - version: '6.8' - architecture: { name: arm64 } - - - architecture: { name: arm64 } - host: { name: macos-latest } - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: test - uses: ./.github/workflows/support/test - with: - name: OpenBSD - architecture: ${{ matrix.architecture.name }} - version: ${{ matrix.version }} - uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }} - work_directory: ${{ matrix.host.work_directory }} - - NetBSD: - name: NetBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }} - runs-on: ${{ matrix.host.name }} - timeout-minutes: 5 - strategy: - fail-fast: false - matrix: - version: - - '9.3' - - '9.2' - - architecture: - - name: x86-64 - uname: amd64 - - host: - - name: ubuntu-latest - work_directory: /home/runner/work/action/action - - - name: macos-latest - work_directory: /Users/runner/work/action/action - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: test - uses: ./.github/workflows/support/test - with: - name: NetBSD - architecture: ${{ matrix.architecture.name }} - version: ${{ matrix.version }} - uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }} - work_directory: ${{ matrix.host.work_directory }} - - test-no-env: - timeout-minutes: 5 - name: Test without environment variables - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: freebsd - architecture: x86-64 - version: '13.0' - shutdown_vm: false - run: env | sort - - test-cpu-count-config: - timeout-minutes: 5 - name: Test configuring CPU count - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: freebsd - architecture: x86-64 - version: '13.1' - cpu_count: 8 - shutdown_vm: false - run: | - sysctl hw.ncpu - [ `sysctl -n hw.ncpu` = 8 ] - - test-hypervisor-config: - timeout-minutes: 5 - name: Test configuring hypervisor - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: freebsd - architecture: x86-64 - version: '13.1' - hypervisor: qemu - shutdown_vm: false - run: sysctl hw.model - - - name: Hypervisor should still be running, verify it's QEMU - run: ps aux | grep -v grep | grep -q qemu - - test-custom-vm-image: - timeout-minutes: 5 - name: Test custom VM image - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: openbsd - architecture: x86-64 - version: '7.3' - image_url: https://github.com/cross-platform-actions/test-custom-image-builder/releases/download/v1.0.0/openbsd-7.3-x86-64.qcow2 - shutdown_vm: false - run: test -f /foo - - test-cpu-features: - timeout-minutes: 5 - name: Test CPU features - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: freebsd - architecture: x86-64 - version: '13.2' - hypervisor: qemu - shutdown_vm: false - run: dmesg | grep -i avx2 - - test-no-vm-shutdown: - timeout-minutes: 5 - name: Test not shutting down the VM - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: freebsd - architecture: x86-64 - version: '13.2' - hypervisor: qemu - shutdown_vm: false - run: true - - - name: Verify VM is still running - run: ps aux | grep -v grep | grep -q qemu - - test-vm-shutdown: - timeout-minutes: 5 - name: Test shutting down the VM - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: freebsd - architecture: x86-64 - version: '13.2' - hypervisor: qemu - shutdown_vm: true - run: true - - - name: Verify VM is not running - run: ps aux | grep -v grep | grep -q -v qemu - - test-sync-files: - timeout-minutes: 5 - name: 'Test sync files: ${{ matrix.data.direction }}' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - data: - - direction: runner-to-vm - run: test -f foo.txt && touch bar.txt - run_after: '! test -f bar.txt' # The new files from the VM should not sync back - - - direction: vm-to-runner - run: '[ ! -f foo.txt ] && touch bar.txt' - run_after: 'test -f bar.txt' # The new files from the VM should sync back - - - direction: false - run: '[ ! -f foo.txt ] && touch bar.txt' - run_after: '! test -f bar.txt' # The new files from the VM should not sync back - - - direction: true - run: test -f foo.txt && touch bar.txt - run_after: test -f bar.txt - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - run: touch foo.txt - - - name: Test - uses: ./ - with: - operating_system: freebsd - architecture: x86-64 - version: '13.2' - sync_files: ${{ matrix.data.direction }} - shutdown_vm: false - run: ${{ matrix.data.run }} - - - name: Run after - run: ${{ matrix.data.run_after }} + # build: # make sure build/ci work properly + # runs-on: ubuntu-latest + # timeout-minutes: 2 + # steps: + # - uses: actions/checkout@v4 + # - run: npm install + # - run: npm run all + # + # FreeBSD: # make sure the action works on a clean machine without building + # name: FreeBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }} + # runs-on: ${{ matrix.host.name }} + # timeout-minutes: 5 + # strategy: + # fail-fast: false + # matrix: + # version: + # - '13.2' + # - '13.1' + # - '13.0' + # - '12.4' + # - '12.2' + # + # architecture: + # - name: arm64 + # - name: x86-64 + # uname: amd64 + # + # host: + # - name: ubuntu-latest + # # /home is symlinked to /usr/home. pwd will return the resolved path. + # work_directory: /usr/home/runner/work/action/action + # + # - name: macos-latest + # work_directory: /Users/runner/work/action/action + # + # exclude: + # - version: '12.2' + # architecture: { name: arm64 } + # + # - architecture: { name: arm64 } + # host: { name: macos-latest } + # + # include: + # - version: '14.0' + # architecture: { name: arm64 } + # host: + # name: ubuntu-latest + # work_directory: /home/runner/work/action/action + # + # - version: '14.0' + # architecture: + # name: x86-64 + # uname: amd64 + # host: + # name: ubuntu-latest + # work_directory: /home/runner/work/action/action + # + # - version: '14.0' + # architecture: + # name: x86-64 + # uname: amd64 + # host: + # name: macos-latest + # work_directory: /Users/runner/work/action/action + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: test + # uses: ./.github/workflows/support/test + # with: + # name: FreeBSD + # architecture: ${{ matrix.architecture.name }} + # version: ${{ matrix.version }} + # uname_release: ${{ matrix.version}}-RELEASE + # uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }} + # work_directory: ${{ matrix.host.work_directory }} + # + # OpenBSD: + # name: OpenBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }} + # runs-on: ${{ matrix.host.name }} + # timeout-minutes: 5 + # strategy: + # fail-fast: false + # matrix: + # version: + # - '7.4' + # - '7.3' + # - '7.2' + # - '7.1' + # - '6.9' + # - '6.8' + # + # architecture: + # - name: arm64 + # - name: x86-64 + # uname: amd64 + # + # host: + # - name: ubuntu-latest + # work_directory: /home/runner/work/action/action + # + # - name: macos-latest + # work_directory: /Users/runner/work/action/action + # + # exclude: + # - version: '6.8' + # architecture: { name: arm64 } + # + # - architecture: { name: arm64 } + # host: { name: macos-latest } + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: test + # uses: ./.github/workflows/support/test + # with: + # name: OpenBSD + # architecture: ${{ matrix.architecture.name }} + # version: ${{ matrix.version }} + # uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }} + # work_directory: ${{ matrix.host.work_directory }} + # + # NetBSD: + # name: NetBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }} + # runs-on: ${{ matrix.host.name }} + # timeout-minutes: 5 + # strategy: + # fail-fast: false + # matrix: + # version: + # - '9.3' + # - '9.2' + # + # architecture: + # - name: x86-64 + # uname: amd64 + # + # host: + # - name: ubuntu-latest + # work_directory: /home/runner/work/action/action + # + # - name: macos-latest + # work_directory: /Users/runner/work/action/action + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: test + # uses: ./.github/workflows/support/test + # with: + # name: NetBSD + # architecture: ${{ matrix.architecture.name }} + # version: ${{ matrix.version }} + # uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }} + # work_directory: ${{ matrix.host.work_directory }} + # + # test-no-env: + # timeout-minutes: 5 + # name: Test without environment variables + # runs-on: ubuntu-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: freebsd + # architecture: x86-64 + # version: '13.0' + # shutdown_vm: false + # run: env | sort + # + # test-cpu-count-config: + # timeout-minutes: 5 + # name: Test configuring CPU count + # runs-on: ubuntu-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: freebsd + # architecture: x86-64 + # version: '13.1' + # cpu_count: 8 + # shutdown_vm: false + # run: | + # sysctl hw.ncpu + # [ `sysctl -n hw.ncpu` = 8 ] + # + # test-hypervisor-config: + # timeout-minutes: 5 + # name: Test configuring hypervisor + # runs-on: macos-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: freebsd + # architecture: x86-64 + # version: '13.1' + # hypervisor: qemu + # shutdown_vm: false + # run: sysctl hw.model + # + # - name: Hypervisor should still be running, verify it's QEMU + # run: ps aux | grep -v grep | grep -q qemu + # + # test-custom-vm-image: + # timeout-minutes: 5 + # name: Test custom VM image + # runs-on: macos-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: openbsd + # architecture: x86-64 + # version: '7.3' + # image_url: https://github.com/cross-platform-actions/test-custom-image-builder/releases/download/v1.0.0/openbsd-7.3-x86-64.qcow2 + # shutdown_vm: false + # run: test -f /foo + # + # test-cpu-features: + # timeout-minutes: 5 + # name: Test CPU features + # runs-on: ubuntu-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: freebsd + # architecture: x86-64 + # version: '13.2' + # hypervisor: qemu + # shutdown_vm: false + # run: dmesg | grep -i avx2 + # + # test-no-vm-shutdown: + # timeout-minutes: 5 + # name: Test not shutting down the VM + # runs-on: ubuntu-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: freebsd + # architecture: x86-64 + # version: '13.2' + # hypervisor: qemu + # shutdown_vm: false + # run: true + # + # - name: Verify VM is still running + # run: ps aux | grep -v grep | grep -q qemu + # + # test-vm-shutdown: + # timeout-minutes: 5 + # name: Test shutting down the VM + # runs-on: ubuntu-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: freebsd + # architecture: x86-64 + # version: '13.2' + # hypervisor: qemu + # shutdown_vm: true + # run: true + # + # - name: Verify VM is not running + # run: ps aux | grep -v grep | grep -q -v qemu + # + # test-sync-files: + # timeout-minutes: 5 + # name: 'Test sync files: ${{ matrix.data.direction }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # data: + # - direction: runner-to-vm + # run: test -f foo.txt && touch bar.txt + # run_after: '! test -f bar.txt' # The new files from the VM should not sync back + # + # - direction: vm-to-runner + # run: '[ ! -f foo.txt ] && touch bar.txt' + # run_after: 'test -f bar.txt' # The new files from the VM should sync back + # + # - direction: false + # run: '[ ! -f foo.txt ] && touch bar.txt' + # run_after: '! test -f bar.txt' # The new files from the VM should not sync back + # + # - direction: true + # run: test -f foo.txt && touch bar.txt + # run_after: test -f bar.txt + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - run: touch foo.txt + # + # - name: Test + # uses: ./ + # with: + # operating_system: freebsd + # architecture: x86-64 + # version: '13.2' + # sync_files: ${{ matrix.data.direction }} + # shutdown_vm: false + # run: ${{ matrix.data.run }} + # + # - name: Run after + # run: ${{ matrix.data.run_after }} multiple-steps: timeout-minutes: 5 @@ -420,24 +420,24 @@ jobs: shutdown_vm: true run: test -f foo.txt - openbsd-qemu-macos: - timeout-minutes: 5 - name: Test OpenBSD with QEMU on macOS runner - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Test - uses: ./ - with: - operating_system: openbsd - architecture: x86-64 - version: '7.4' - hypervisor: qemu - sync_files: false - shutdown_vm: false - run: true + # openbsd-qemu-macos: + # timeout-minutes: 5 + # name: Test OpenBSD with QEMU on macOS runner + # runs-on: macos-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # persist-credentials: false + # + # - name: Test + # uses: ./ + # with: + # operating_system: openbsd + # architecture: x86-64 + # version: '7.4' + # hypervisor: qemu + # sync_files: false + # shutdown_vm: false + # run: true