name: Build and publish nightly on: push: branches: - 'master' paths-ignore: - 'README*.md' jobs: linux: name: "Linux build" runs-on: ubuntu-latest env: PREFIX: "/usr" PY3PATH: "" steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Launchpad PPA id: launchpad_ppa run: | sudo add-apt-repository -y ppa:dciabrin/ngdevkit sudo apt-get update -y toolchain_version=$(sudo apt-cache policy ngdevkit-toolchain | awk '/Candidate:/ {print $2}') arch=$(dpkg --print-architecture) echo "toolchain_deb=ngdevkit-toolchain_${toolchain_version}_${arch}.deb" >> "$GITHUB_OUTPUT" - name: Cache ngdevkit-toolchain package uses: actions/cache@v5 with: path: /tmp/${{ steps.launchpad_ppa.outputs.toolchain_deb }} key: ${{ steps.launchpad_ppa.outputs.toolchain_deb }} - name: Prepare cached dependency run: | if [ ! -f /tmp/${{ steps.launchpad_ppa.outputs.toolchain_deb }} ]; then cd /tmp && sudo apt-get download ngdevkit-toolchain fi sudo cp /tmp/${{ steps.launchpad_ppa.outputs.toolchain_deb }} /var/cache/apt/archives - name: Install dependencies run: | sudo apt-get install -y ngdevkit-toolchain python3 python3-pil python3-ruamel.yaml zip pkg-config - name: Build ngdevkit run: ./.github/scripts/build.sh - name: Install dependencies for ngdevkit-examples run: > sudo apt-get install -y ngdevkit-gngeo imagemagick sox libsox-fmt-mp3 libglew-dev libsdl2-dev - name: Test by compiling ngdevkit-examples run: ./.github/scripts/test.sh win: name: "Windows native MSYS2 build" runs-on: windows-latest env: PY3PATH: "" defaults: run: shell: msys2 {0} steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install MSYS2 uses: msys2/setup-msys2@v2 with: msystem: UCRT64 update: true install: git autoconf automake make zip rsync pactoys mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-pillow mingw-w64-ucrt-x86_64-python-ruamel-yaml - name: Install ngdevkit dependencies run: | echo -e "[ngdevkit]\nSigLevel = Optional TrustAll\nServer = https://dciabrin.net/msys2-ngdevkit/\$arch" >> /etc/pacman.conf pacman -Sy pacman -S --disable-download-timeout --noconfirm mingw-w64-ucrt-x86_64-ngdevkit-toolchain - name: Build run: ./.github/scripts/build-msys2.sh - name: Install dependencies for ngdevkit-examples run: | pacboy -S --noconfirm ngdevkit-gngeo:u toolchain:u zlib:u sox:u imagemagick:u - name: Test by compiling ngdevkit-examples run: ./.github/scripts/test.sh macos: name: "macOS build" runs-on: xcode-27 env: PREFIX: "/opt/homebrew" PY3PATH: "/opt/homebrew/bin" steps: - name: Checkout uses: actions/checkout@v4 - name: Dependencies run: | brew tap dciabrin/ngdevkit brew trust dciabrin/ngdevkit brew install python3 --overwrite brew install pillow brew install automake ngdevkit-toolchain zip pkg-config sdl2 sdl2_image $(brew --prefix python)/libexec/bin/pip install ruamel.yaml --break-system-packages - name: Build run: ./.github/scripts/build.sh - name: Install dependencies for ngdevkit-examples run: | brew install ngdevkit-gngeo imagemagick sox glew make - name: Test by compiling ngdevkit-examples run: ./.github/scripts/test.sh deploy_deb: name: "deb: trigger Launchpad rebuild" runs-on: ubuntu-latest needs: [linux, macos, win] steps: - name: Checkout uses: actions/checkout@v4 - name: "Launchpad: trigger nightly deb rebuild" run: .ci/trigger-launchpad-build.sh --slug="~dciabrin/ngdevkit/+git/ngdevkit" --name="Travis%20Deploy" env: LAUNCHPAD_TOKEN: ${{ secrets.LAUNCHPAD_TOKEN }} LAUNCHPAD_TOKEN_SECRET: ${{ secrets.LAUNCHPAD_TOKEN_SECRET }} deploy_rpm: name: "rpm: trigger COPR rebuild" runs-on: ubuntu-latest needs: [linux, macos, win] steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: "COPR: push new nightly revision" run: | git config --global user.name 'CI build bot' git config --global user.email '<>' git config --global url."https://api@github.com/".insteadOf "https://github.com/" git clone https://github.com/dciabrin/copr-ngdevkit .ci/copr-ngdevkit .ci/copr-ngdevkit/.ci/bump-project-nightly-build.sh ngdevkit .ci/copr-ngdevkit/.ci/trigger-copr-build.sh --package ngdevkit env: GH_TOKEN: ${{ secrets.GH_TOKEN }} COPR_SECRET: ${{ secrets.COPR_SECRET }} LAUNCHPAD_TOKEN: ${{ secrets.LAUNCHPAD_TOKEN }} LAUNCHPAD_TOKEN_SECRET: ${{ secrets.LAUNCHPAD_TOKEN_SECRET }} deploy_brew: name: "brew: trigger bottle rebuild" runs-on: ubuntu-latest needs: [linux, macos, win] steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: "Brew: push new nightly revision and bottle" run: | git config --global user.name 'CI build bot' git config --global user.email '<>' git config --global url."https://api@github.com/".insteadOf "https://github.com/" git clone https://github.com/dciabrin/homebrew-ngdevkit .ci/homebrew-ngdevkit .ci/homebrew-ngdevkit/.ci/bump-project-nightly-build.sh --package ngdevkit --batch env: GH_TOKEN: ${{ secrets.GH_TOKEN }} deploy_msys2: name: "msys2: trigger package rebuild" runs-on: ubuntu-latest needs: [linux, macos, win] steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: "MSYS2: push new nightly revision and rebuild package repository" run: | git config --global user.name 'CI build bot' git config --global user.email '<>' git config --global url."https://api@github.com/".insteadOf "https://github.com/" git clone https://github.com/dciabrin/msys2-ngdevkit .ci/msys2-ngdevkit .ci/msys2-ngdevkit/.ci/bump-project-nightly-build.sh --package ngdevkit --batch env: GH_TOKEN: ${{ secrets.GH_TOKEN }} cleanup_tags: name: "Cleanup tags and artefacts" runs-on: ubuntu-latest needs: [deploy_deb, deploy_rpm, deploy_brew, deploy_msys2] steps: - name: Checkout uses: actions/checkout@v4 - name: "Cleanup old nightly tags" run: .ci/gc-nightly-tags.sh --user=dciabrin --repo=ngdevkit --tag-regex='^refs/tags/nightly-[0-9]*' env: GH_TOKEN: ${{ secrets.GH_TOKEN }}