3.22 support #3556
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: pr | |
| on: pull_request | |
| jobs: | |
| lint: | |
| name: Check that it conforms to the style guide | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout the Git repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Toltec dependencies | |
| uses: ./.github/actions/setup | |
| - name: Check formatting | |
| run: make format | |
| - name: Check for erroneous constructs | |
| run: make lint | |
| dependencies: | |
| name: Generate dependency chains | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| recipes-matrix: ${{ steps.recipes-matrix.outputs.JSON_CONTENT }} | |
| steps: | |
| - name: Checkout the Git repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Toltec dependencies | |
| uses: ./.github/actions/setup | |
| - name: Cache repo | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/repo | |
| key: ${{ github.base_ref }}-${{ hashFiles('package/*/package') }} | |
| - name: Get recipe lists | |
| id: recipes-matrix | |
| run: | | |
| make .venv/bin/activate | |
| echo 'JSON_CONTENT<<EOF' >> $GITHUB_OUTPUT | |
| echo '{"include":' >> $GITHUB_OUTPUT | |
| make dependency-chain >> $GITHUB_OUTPUT | |
| echo "}" >> $GITHUB_OUTPUT | |
| echo 'EOF' >> $GITHUB_OUTPUT | |
| env: | |
| FLAGS: --remote-repo https://toltec-dev.org/${{ github.base_ref }} | |
| pr: | |
| name: Build ${{ matrix.recipes }} | |
| runs-on: ubuntu-24.04 | |
| needs: [lint, dependencies] | |
| strategy: | |
| matrix: ${{ fromJson(needs.dependencies.outputs.recipes-matrix) }} | |
| fail-fast: false | |
| steps: | |
| - name: Checkout the Git repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Toltec dependencies | |
| uses: ./.github/actions/setup | |
| - name: Cache repo | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/repo | |
| key: ${{ github.base_ref }}-${{ hashFiles('package/*/package') }} | |
| - name: Build packages | |
| run: make repo-new | |
| env: | |
| FLAGS: --remote-repo https://toltec-dev.org/${{ github.base_ref }} --filter "${{ matrix.recipes }}" | |
| CLEANUP: 1 | |
| - name: Upload all ipk | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: recipes-${{ matrix.recipes }} | |
| path: build/repo/**/*.ipk | |
| experimental: | |
| name: Generate dependency chains | |
| runs-on: ubuntu-24.04 | |
| needs: [pr] | |
| if: ${{ contains(github.event.pull_request.labels.*.name, 'experimental') }} | |
| steps: | |
| - name: Checkout the Git repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Toltec dependencies | |
| uses: ./.github/actions/setup | |
| - name: Cache repo | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/repo | |
| key: ${{ github.base_ref }}-${{ hashFiles('package/*/package') }} | |
| - name: Download all packages | |
| uses: actions/download-artifact@v5 | |
| with: | |
| path: build/repo | |
| pattern: recipes-* | |
| merge-multiple: true | |
| - name: Build packages for experimental | |
| run: make repo | |
| env: | |
| FLAGS: --remote-repo https://toltec-dev.org/${{ github.base_ref }} | |
| CLEANUP: 1 | |
| - name: Sync packages with the remote repository | |
| uses: ./.github/actions/sync-repository | |
| with: | |
| local-path: build/repo/ | |
| ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
| ssh-port: ${{ secrets.SSH_PORT }} | |
| remote-path: ${{ secrets.REMOTE_SSH }}:/srv/toltec/experimental |