name: Bob the Builder on: push: branches: - main workflow_dispatch: jobs: build: name: Build Infix ${{ matrix.target }} runs-on: [ self-hosted, latest ] strategy: matrix: target: [aarch64, x86_64] fail-fast: false steps: - uses: actions/checkout@v4 with: clean: true submodules: recursive - name: Set Build Variables id: vars run: | target=${{ matrix.target }} echo "dir=infix-$target" >> $GITHUB_OUTPUT echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT - name: Restore Cache of dl/ uses: actions/cache@v4 with: path: dl/ key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }} restore-keys: | dl- - name: Restore Cache of .ccache/ uses: actions/cache@v4 with: path: .ccache/ key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }} restore-keys: | ccache-${{ matrix.target }}- ccache- - name: Configure & Build run: | target=${{ matrix.target }}_defconfig echo "Building $target ..." make $target make - name: Prepare Artifact run: | cd output/ mv images ${{ steps.vars.outputs.dir }} ln -s ${{ steps.vars.outputs.dir }} images tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }} - name: Test if: matrix.target == 'x86_64' run: | make test - uses: actions/upload-artifact@v4 with: path: output/${{ steps.vars.outputs.tgz }} name: artifact-${{ matrix.target }} release: if: ${{github.repository_owner == 'kernelkit' && github.ref_name == 'main'}} name: Upload Latest Build needs: build runs-on: [ self-hosted, latest ] permissions: contents: write steps: - uses: actions/download-artifact@v4 with: pattern: "artifact-*" merge-multiple: true - uses: ncipollo/release-action@v1 with: allowUpdates: true omitName: true omitBody: true omitBodyDuringUpdate: true prerelease: true tag: "latest" token: ${{ secrets.GITHUB_TOKEN }} artifacts: "*.tar.gz" - name: Summary run: | cat <> $GITHUB_STEP_SUMMARY # Latest Build Complete! :rocket: For the public download links of these build artifacts, please see: EOF