on: [push, pull_request] name: Build jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v5 with: persist-credentials: true - name: Checkout lfs run: | git lfs install --local AUTH=$(git config --local http.${{ github.server_url }}/.extraheader) git config --local --unset http.${{ github.server_url }}/.extraheader git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH" git lfs pull - name: Apt update run: sudo apt update - name: Installing build chain run: sudo apt-get install pigz ninja-build g++ clang pkg-config libssl-dev zlib1g-dev libopus-dev -y; - name: Cache CPM uses: actions/cache@v5 with: path: "~/.cache/CPM/" key: ${{ runner.os }}-CPM - name: Configure debug run: cd scripts; CPM_SOURCE_CACHE="~/.cache/CPM/" ./configure-debug.sh - name: Configure release run: cd scripts; CPM_SOURCE_CACHE="~/.cache/CPM/" ./configure-release.sh - name: Configure RelWithDeb run: cd scripts; CPM_SOURCE_CACHE="~/.cache/CPM/" ./configure-relwithdeb.sh - name: Build debug run: cd scripts; ./build-debug.sh - name: Build release run: cd scripts; ./build-release.sh - name: Build Release with debug info run: cd scripts; ./build-relwithdeb.sh - name: Packaging run: |- tar -I 'pigz -9' -cf dppbots-debug-amd64.tar.gz --transform 's,^,dppbots/,' bin/Debug src cmake CMakeLists.txt LICENSE; tar -I 'pigz -9' -cf dppbots-rel-amd64.tar.gz --transform 's,^,dppbots/,' bin/Release src cmake CMakeLists.txt LICENSE; tar -I 'pigz -9' -cf dppbots-relwithdeb-amd64.tar.gz --transform 's,^,dppbots/,' bin/Relwithdeb src cmake CMakeLists.txt LICENSE; - uses: akkuman/gitea-release-action@v1 with: files: |- dppbots-debug-amd64.tar.gz dppbots-rel-amd64.tar.gz dppbots-relwithdeb-amd64.tar.gz