-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,88 @@ | ||
--- | ||
name: VMs | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
variants: | ||
default: freebsd openbsd netbsd solaris dragonflybsd omnios | ||
|
||
env: | ||
test_code: | | ||
set -e | ||
export FORCE_COLOR=1 | ||
. /tmp/env/bin/activate | ||
pip install -Uq setuptools pip | ||
pip install -qe . -r tests/requirements.txt psutil | ||
pip freeze | ||
CC=gcc ./test | ||
python stdlib/availability.py | ||
ls packaging/contains-slugs/dist/ | ||
not which clang || CC=clang ./test | ||
jobs: | ||
parse-parameters: | ||
freebsd: | ||
runs-on: ubuntu-latest | ||
if: contains(inputs.variants, 'freebsd') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: vmactions/freebsd-vm@v1 | ||
with: | ||
run: | | ||
pkg install -y python311 py311-sqlite3 gcc clang | ||
python3.11 -m venv /tmp/env | ||
${{ env.test_code }} | ||
openbsd: | ||
runs-on: ubuntu-latest | ||
if: contains(inputs.variants, 'openbsd') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: vmactions/openbsd-vm@v1 | ||
with: | ||
run: | | ||
pkg_add python3 gcc clang | ||
python3 -m venv /tmp/env | ||
${{ env.test_code }} | ||
netbsd: | ||
runs-on: ubuntu-latest | ||
if: contains(inputs.variants, 'netbsd') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: vmactions/netbsd-vm@v1 | ||
with: | ||
run: | | ||
pkg_search python | ||
pkg_search py3 | ||
pkg_add python312 | ||
echo y | pkgin python312 | ||
pkg_add py310 | ||
pkg_add py39 | ||
pkg_add py12 | ||
python3 -m venv /tmp/env | ||
${{ env.test_code }} | ||
solaris: | ||
runs-on: ubuntu-latest | ||
if: contains(inputs.variants, 'solaris') | ||
steps: | ||
- id: parse | ||
shell: python | ||
run: | | ||
import re, json | ||
variants = re.findall(r"\w+", "${{ github.event.inputs.variants }}") | ||
variants = variants or ["freebsd", "openbsd", "netbsd"] | ||
print("::set-output name=variants::" + json.dumps(variants)) | ||
outputs: | ||
variants: ${{ steps.parse.outputs.variants }} | ||
- uses: actions/checkout@v4 | ||
- uses: vmactions/solaris-vm@v1 | ||
with: | ||
run: | | ||
python -m venv /tmp/env | ||
${{ env.test_code }} | ||
- uses: neilpang/debugger-action@master | ||
|
||
test: | ||
needs: parse-parameters | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
variant: ${{ fromJson(needs.parse-parameters.outputs.variants) }} | ||
runs-on: macos-12 | ||
omnios: | ||
runs-on: ubuntu-latest | ||
if: contains(inputs.variants, 'omnios') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: echo ${{ needs.parse-parameters.outputs.variants }} | ||
- run: vagrant up ${{ matrix.variant }} | ||
- run: vagrant ssh ${{ matrix.variant }} -- ./test | ||
- run: vagrant ssh ${{ matrix.variant }} -- python stdlib/availability.py | ||
- uses: vmactions/omnios-vm@v1 | ||
with: | ||
run: | | ||
pkg install developer/gcc13 | ||
pkg install ooce/developer/clang-18 | ||
python -m venv /tmp/env | ||
${{ env.test_code }} |