Update workflow #35
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
name: Test Self-Hosted Runner | |
on: | |
push: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
workflow_dispatch: | |
jobs: | |
setup: | |
runs-on: self-hosted | |
outputs: | |
matrix-all-projects: ${{ steps.all-projects.outputs.matrix }} | |
matrix-modified-projects: ${{ steps.modified-projects.outputs.matrix }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Fetch all branches | |
run: git fetch --all | |
- name: Setup Python | |
run: | | |
python3 -m venv .venv | |
- name: Get all projects | |
id: all-projects | |
run: | | |
source .venv/bin/activate | |
python3 scripts/actions/all_projects.py | |
echo "matrix=$(cat all_projects.json)" >> $GITHUB_OUTPUT | |
- name: Get modified projects | |
id: modified-projects | |
run: | | |
source .venv/bin/activate | |
python3 scripts/actions/modified_projects.py ${{ github.base_ref || 'main' }} | |
echo "matrix=$(cat modified_projects.json)" >> $GITHUB_OUTPUT | |
build-all-projects: | |
needs: setup | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJson(needs.setup.outputs.matrix-all-projects) }} | |
uses: ./.github/workflows/reusable-build-project.yml | |
with: | |
project: ${{ matrix.project }} | |
platform: ${{ matrix.platform }} | |
build-modified-projects: | |
needs: setup | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJson(needs.setup.outputs.matrix-modified-projects) }} | |
uses: ./.github/workflows/reusable-build-project.yml | |
with: | |
project: ${{ matrix.project }} | |
platform: ${{ matrix.platform }} |