🎛 ci: Dynamic CI #340
This file contains hidden or 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 macOS features | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "docs/**" | |
| - "docs/**" | |
| pull_request: | |
| jobs: | |
| generate-matrix: | |
| name: 🌀 Generate matrix | |
| runs-on: macos-latest | |
| outputs: | |
| features: ${{ steps.merge-features.outputs.features }} | |
| steps: | |
| - name: 🛒 Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🗂️ Get all features | |
| id: all-features | |
| run: .github/scripts/all-features.sh | |
| - name: 📄 List changed files | |
| id: changed-files | |
| run: .github/scripts/changed-files.sh '${{ toJson(github) }}' | |
| - name: 🧮 Generate feature list | |
| id: feature-list | |
| run: .github/scripts/feature-list.sh '${{ steps.changed-files.outputs.paths }}' | |
| - name: 📊 Generate affected feature list | |
| id: affected-list | |
| run: .github/scripts/affected-list.py '${{ steps.feature-list.outputs.features }}' '${{ steps.all-features.outputs.features }}' | |
| # TODO: Remove this step when all features are moved under pkg/ | |
| - name: 🔀 Merge with fixed features | |
| id: merge-features | |
| run: .github/scripts/merge-features.sh '${{ steps.affected-list.outputs.features }}' | |
| macos: | |
| name: 🖥️ macOS Test | |
| runs-on: macos-latest | |
| needs: generate-matrix | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| features: ${{ fromJson(needs.generate-matrix.outputs.features) }} | |
| steps: | |
| - name: 🛒 Checkout | |
| uses: actions/checkout@v4 | |
| - name: 🧪 Test "${{ matrix.features }}" | |
| run: make ${{ matrix.features }} |