compile hostprogram as static #578
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: CI | |
| on: | |
| push: | |
| branches: [ "6" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/eebssk1/debian-trixie:latest | |
| volumes: | |
| - /root:/user | |
| strategy: | |
| matrix: | |
| compiler: [llvm, gcc] | |
| target: [desktop, server_large, server_small, server_small_2, server_small_a, server_small_g ] | |
| exclude: | |
| - target: server_small_a | |
| compiler: llvm | |
| env: | |
| GZIP: -8 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: setup swap | |
| run: exec ./swap.sh | |
| - name: enable ccache | |
| uses: hendrikmuhs/ccache-action@v1.2.17 | |
| with: | |
| verbose: 1 | |
| max-size: "960M" | |
| key: ${{ matrix.target }}-${{ matrix.compiler }}-612 | |
| - name: build | |
| run: ./b.sh ${{ matrix.target }} ${{ matrix.compiler }} | |
| - name: upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debs_${{ matrix.target }}-${{ matrix.compiler }} | |
| path: "*.deb" | |
| - name: commit compare | |
| id: cc | |
| continue-on-error: true | |
| run: | | |
| set +e | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| git fetch --prune --tags | |
| PSHA=$(git rev-list -n 1 "${{ env.VER }}-${{ matrix.compiler }}") | |
| if [ "$PSHA" = "" ]; then | |
| exit 0 | |
| fi | |
| if [ "$PSHA" != "$GITHUB_SHA" ]; then | |
| echo "build on different commit, release tag may need purge" | |
| echo NEEDDEL=1 >> $GITHUB_OUTPUT | |
| fi | |
| exit 0 | |
| - name: delete tag if exists | |
| uses: ClementTsang/delete-tag-and-release@v0.4.0 | |
| if: steps.cc.outputs.NEEDDEL == '1' | |
| continue-on-error: true | |
| with: | |
| delete_release: true | |
| tag_name: ${{ env.VER }}-${{ matrix.compiler }} | |
| - name: release | |
| uses: ncipollo/release-action@v1.14.0 | |
| with: | |
| allowUpdates: true | |
| artifacts: "*.deb" | |
| commit: 6 | |
| makeLatest: ${{ matrix.compiler == 'gcc' }} | |
| tag: ${{ env.VER }}-${{ matrix.compiler }} |