55 description : " A identifier for this test run. Will be included in the Please log archive file name."
66 type : string
77 default : test
8- runner :
9- description : " The GitHub runner type on which this workflow should run."
8+ platform :
9+ description : " The platform on which this workflow should run. Must be one of darwin_amd64, darwin_arm64, freebsd_amd64, linux_amd64 or linux_arm64 ."
1010 required : true
1111 type : string
1212 python :
13- description : " The Python version to configure the plugin to use. Must be a value of python-version recognised by the actions/setup-python action ."
13+ description : " The major Python version to configure the plugin to use."
1414 required : true
1515 type : string
1616 please_pex_from_repo :
2525jobs :
2626 test :
2727 name : Run tests
28- runs-on : ${{ inputs.runner }}
28+ runs-on : ${{ ( inputs.platform == 'freebsd_amd64' || inputs.platform == 'linux_amd64') && 'ubuntu-24.04' || (inputs.platform == 'linux_arm64' && 'ubuntu-24.04-arm' || (inputs.platform == 'darwin_amd64' && 'macos-15-intel' || (inputs.platform == 'darwin_arm64' && 'macos-15' || 'unknown'))) }}
2929 steps :
3030 - name : Install Python in CI environment
31+ if : ${{ inputs.platform != 'freebsd_amd64' }}
3132 id : python
3233 uses : actions/setup-python@v6
3334 with :
@@ -37,15 +38,30 @@ jobs:
3738 uses : actions/checkout@v5
3839 - name : Configure plugin's default Python interpreter
3940 run : |
40- echo "PLZ_ARGS=-o plugin.python.defaultinterpreter:${{ steps.python.outputs.python-path }}" >> $GITHUB_ENV
41+ _python_path="${{ inputs.platform == 'freebsd_amd64' && format('python{0}', inputs.python) || steps.python.outputs.python-path }}"
42+ echo "PLZ_ARGS=-o plugin.python.defaultinterpreter:$_python_path" >> $GITHUB_ENV
4143 - name : Configure plugin to use please_pex tool built from source
4244 if : inputs.please_pex_from_repo
4345 run : |
4446 echo "PLZ_ARGS=${PLZ_ARGS:+$PLZ_ARGS }-o plugin.python.pextool://tools/please_pex" >> $GITHUB_ENV
45- - name : Run tests
46- run : ./pleasew test --keep_going --log_file plz-out/log/test.log ${{ inputs.test_targets }}
47+ - name : Run tests (in nested runner)
48+ if : ${{ inputs.platform == 'freebsd_amd64' }}
49+ uses : cross-platform-actions/action@v0.30.0
50+ with :
51+ operating_system : freebsd
52+ architecture : x86-64
53+ version : ' 14.3'
54+ image_url : https://github.com/please-build/freebsd-builder/releases/download/v0.12.0-please.3/freebsd-14.3-x86-64.qcow2
55+ shell : bash
56+ environment_variables : PLZ_ARGS
57+ shutdown_vm : true
58+ run : ./pleasew test --keep_going --log_file plz-out/log/test.log ${{ inputs.test_targets }}
59+ - name : Run tests (on host)
60+ if : ${{ inputs.platform != 'freebsd_amd64' }}
61+ run : |
62+ ./pleasew test --keep_going --log_file plz-out/log/test.log ${{ inputs.test_targets }}
4763 - name : Archive logs
4864 uses : actions/upload-artifact@v4
4965 with :
50- name : logs-${{ inputs.id }}-python_${{ inputs.python }}-please_pex_${{ inputs.please_pex_from_repo && 'repo' || 'stable' }}
66+ name : logs-${{ inputs.id }}-${{ inputs.platform }}- python_${{ inputs.python }}-please_pex_${{ inputs.please_pex_from_repo && 'repo' || 'stable' }}
5167 path : plz-out/log
0 commit comments