Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/scripts/changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def script(selected, name):
enable(selected, 'linux', 'diagnostics')
elif name == 'install-cygwin.ps1':
enable(selected, 'other', 'diagnostics')
elif name == 'prepare-vm-host.sh':
enable(selected, 'bsd', 'other', 'diagnostics', 'interoperability')
elif name == 'ubuntu-apt.sh':
enable(selected, 'linux', 'bsd', 'other', 'android', 'archive', 'diagnostics', 'versions',
'valgrind', 'interoperability', 'asan', 'coverage', 'static_analysis')
Expand Down
28 changes: 28 additions & 0 deletions .github/scripts/prepare-vm-host.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
set -eu

case "${1-}" in
retry|update-first) mode=$1; shift ;;
*) echo 'usage: prepare-vm-host.sh {retry|update-first} {base|autotools}' >&2; exit 2 ;;
esac
if [ "$#" -ne 1 ]; then
echo 'usage: prepare-vm-host.sh {retry|update-first} {base|autotools}' >&2
exit 2
fi

case "${1-}" in
base) set -- qemu-utils qemu-system-x86 ovmf ;;
autotools) set -- autoconf automake qemu-utils qemu-system-x86 ovmf ;;
*) echo 'unknown VM host package set' >&2; exit 2 ;;
esac

if [ "$mode" = update-first ]; then
sh .github/scripts/ubuntu-apt.sh update
exec sh .github/scripts/ubuntu-apt.sh install -y "$@"
fi

if sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@"; then
exit 0
fi
sh .github/scripts/ubuntu-apt.sh update -q
exec sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@"
1 change: 1 addition & 0 deletions .github/scripts/test-changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def test_ci_files_select_their_owner(self):
'.github/scripts/changes.py': full_selection,
'.github/scripts/test-changes.py': {'diagnostics'},
'.github/scripts/check-platform.py': {'linux', 'macos', 'other', 'diagnostics'},
'.github/scripts/prepare-vm-host.sh': {'bsd', 'other', 'diagnostics', 'interoperability'},
'.github/scripts/ubuntu-apt.sh': full_selection - {'macos'},
'.github/actions/interoperability/action.yml': {'interoperability', 'diagnostics'},
'.github/actions/interop-upload/action.yml': {'interoperability', 'diagnostics'},
Expand Down
21 changes: 3 additions & 18 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ jobs:
persist-credentials: false
- name: Prepare VM host
timeout-minutes: 10
run: |
set -- qemu-utils qemu-system-x86 ovmf
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@" || {
sh .github/scripts/ubuntu-apt.sh update -q
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@"
}
run: sh .github/scripts/prepare-vm-host.sh retry base
- name: Run VM and collect results
uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1.5.9
with:
Expand Down Expand Up @@ -94,12 +89,7 @@ jobs:
persist-credentials: false
- name: Prepare VM host
timeout-minutes: 10
run: |
set -- autoconf automake qemu-utils qemu-system-x86 ovmf
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@" || {
sh .github/scripts/ubuntu-apt.sh update -q
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@"
}
run: sh .github/scripts/prepare-vm-host.sh retry autotools
- name: Prepare source
run: ./prepare-source
- name: Run VM and collect results
Expand Down Expand Up @@ -166,12 +156,7 @@ jobs:
persist-credentials: false
- name: Prepare VM host
timeout-minutes: 10
run: |
set -- qemu-utils qemu-system-x86 ovmf
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@" || {
sh .github/scripts/ubuntu-apt.sh update -q
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@"
}
run: sh .github/scripts/prepare-vm-host.sh retry base
- name: Run VM and collect results
uses: vmactions/openbsd-vm@f1ca8bc8ecc5b6ef7218e5b914836e067e1546d3 # v1.4.9
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/interoperability-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
persist-credentials: false
- name: Prepare VM host
run: sh .github/scripts/ubuntu-apt.sh update && sh .github/scripts/ubuntu-apt.sh install -y qemu-utils qemu-system-x86 ovmf
run: sh .github/scripts/prepare-vm-host.sh update-first base
- name: Configure and build
uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1.5.9
with:
Expand All @@ -75,7 +75,7 @@ jobs:
with:
persist-credentials: false
- name: Prepare VM host
run: sh .github/scripts/ubuntu-apt.sh update && sh .github/scripts/ubuntu-apt.sh install -y autoconf automake qemu-utils qemu-system-x86 ovmf
run: sh .github/scripts/prepare-vm-host.sh update-first autotools
- name: Prepare source
run: ./prepare-source
- name: Configure and build
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
with:
persist-credentials: false
- name: Prepare VM host
run: sh .github/scripts/ubuntu-apt.sh update && sh .github/scripts/ubuntu-apt.sh install -y qemu-utils qemu-system-x86 ovmf
run: sh .github/scripts/prepare-vm-host.sh update-first base
- name: Configure and build
uses: vmactions/openbsd-vm@f1ca8bc8ecc5b6ef7218e5b914836e067e1546d3 # v1.4.9
with:
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
with:
persist-credentials: false
- name: Prepare VM host
run: sh .github/scripts/ubuntu-apt.sh update && sh .github/scripts/ubuntu-apt.sh install -y qemu-utils qemu-system-x86 ovmf
run: sh .github/scripts/prepare-vm-host.sh update-first base
- name: Configure and build
uses: vmactions/solaris-vm@87d3c436511cef802cd1637f86f73b1a97715c8c # v1.4.1
with:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,7 @@ jobs:
persist-credentials: false
- name: Prepare VM host
timeout-minutes: 10
run: |
set -- qemu-utils qemu-system-x86 ovmf
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@" || {
sh .github/scripts/ubuntu-apt.sh update -q
sh .github/scripts/ubuntu-apt.sh install -y -q -o Acquire::Retries=3 --no-install-recommends "$@"
}
run: sh .github/scripts/prepare-vm-host.sh retry base
- name: Run VM and collect results
uses: vmactions/solaris-vm@87d3c436511cef802cd1637f86f73b1a97715c8c # v1.4.1
with:
Expand Down
Loading