msys2: move CI build to ucrt64 subsystem #20
This file contains 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: Build and publish nightly | |
on: | |
push: | |
branches: | |
- 'ngdevkit' | |
jobs: | |
linux: | |
name: "Linux build" | |
runs-on: ubuntu-latest | |
env: | |
BUILD_PARAMS: "" | |
PREFIX: "/tmp/build/linux" | |
PKGDATADIR: "$PREFIX/share/ngdevkit-gngeo" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo add-apt-repository -y ppa:dciabrin/ngdevkit | |
sudo apt-get update -y | |
sudo apt-get install -y emudbg-dev autoconf-archive libsdl2-dev libglew-dev | |
- name: Build | |
run: ./.github/scripts/build.sh | |
win: | |
name: "Windows native MSYS2 build" | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: | |
git autoconf autoconf-archive automake make | |
mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-libtool | |
mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-SDL2 | |
mingw-w64-ucrt-x86_64-glew | |
- 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 --noconfirm mingw-w64-ucrt-x86_64-emudbg | |
- name: Build | |
run: ./.github/scripts/build-msys2.sh | |
macos: | |
name: "macOS build" | |
runs-on: macos-latest | |
env: | |
BUILD_PARAMS: "" | |
PREFIX: "/tmp/build/macos" | |
PKGDATADIR: "$PREFIX/share/ngdevkit-gngeo" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
brew tap dciabrin/ngdevkit | |
brew install emudbg automake autoconf-archive sdl2 glew | |
- name: Build | |
run: ./.github/scripts/build.sh | |
deploy_deb: | |
name: "deb: trigger Launchpad rebuild" | |
runs-on: ubuntu-latest | |
needs: [linux, win, macos] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: "Launchpad: trigger nightly deb rebuild" | |
run: .ci/trigger-launchpad-build.sh --slug="~dciabrin/ngdevkit/+git/gngeo" --name="Travis%20Deploy" | |
env: | |
LAUNCHPAD_TOKEN: ${{ secrets.LAUNCHPAD_TOKEN }} | |
LAUNCHPAD_TOKEN_SECRET: ${{ secrets.LAUNCHPAD_TOKEN_SECRET }} | |
deploy_rpm: | |
name: "rpm: trigger COPR rebuild" | |
needs: [linux, win, macos] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
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-gngeo ngdevkit | |
.ci/copr-ngdevkit/.ci/trigger-copr-build.sh --package ngdevkit-gngeo | |
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, win, macos] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
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-gngeo --batch | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
deploy_msys2: | |
name: "msys2: trigger package rebuild" | |
needs: [linux, win, macos] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
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-gngeo --branch 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@v2 | |
- name: "Cleanup old nightly tags and releases" | |
run: .ci/github-gc.sh --user=dciabrin --repo=gngeo --tag-regex='^nightly-[0-9]*' | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} |