111 lines
3.1 KiB
YAML
111 lines
3.1 KiB
YAML
name: build
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
jobs:
|
|
windows-msys:
|
|
name: ${{ matrix.config }} Windows ${{ matrix.arch }}
|
|
runs-on: windows-2019
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [x86, x86_64]
|
|
cc: [gcc]
|
|
include:
|
|
- arch: x86
|
|
msystem: MINGW32
|
|
prefix: mingw-w64-i686
|
|
|
|
- arch: x86_64
|
|
msystem: MINGW64
|
|
prefix: mingw-w64-x86_64
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
install: ${{ matrix.prefix }}-qt5-base ${{ matrix.prefix }}-libxml2 svn git
|
|
msystem: ${{ matrix.msystem }}
|
|
path-type: minimal
|
|
release: false
|
|
update: false
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Build
|
|
run: |
|
|
make DOWNLOAD_GAMEPACKS=no MAKEFILE_CONF=msys2-Makefile.conf BUILD=release -j$(nproc) 2> windows-warn-${{ matrix.arch }}.log
|
|
wget https://www.dropbox.com/s/b1xpajzfa6yjlzf/netradiant-custom-extra-gamepacks.zip
|
|
unzip -o netradiant-custom-extra-gamepacks.zip -d "install"
|
|
wget https://www.dropbox.com/s/hcgkwzzmja3m6c0/netradiant-custom-extra-win.zip
|
|
unzip -o netradiant-custom-extra-win.zip -d "install"
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Windows-${{ matrix.arch }}
|
|
path: install/
|
|
if-no-files-found: error
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: warnings
|
|
path: windows-warn*.log
|
|
|
|
linux:
|
|
name: ${{ matrix.config }} Linux ${{ matrix.arch }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [x86_64]
|
|
|
|
steps:
|
|
- name: Install tools
|
|
run: |
|
|
sudo apt-get -qq update
|
|
sudo apt-get -y install mesa-common-dev qtbase5-dev
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Build
|
|
run: |
|
|
make -j 4 DOWNLOAD_GAMEPACKS=no CXXFLAGS="-Wno-deprecated-copy"
|
|
wget https://www.dropbox.com/s/b1xpajzfa6yjlzf/netradiant-custom-extra-gamepacks.zip
|
|
unzip -o netradiant-custom-extra-gamepacks.zip -d "install"
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Linux-${{ matrix.arch }}
|
|
path: install/
|
|
if-no-files-found: error
|
|
|
|
create-testing:
|
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
|
needs: [windows-msys, linux]
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Download Artifacts
|
|
uses: actions/download-artifact@v3
|
|
|
|
- name: Create binary archives
|
|
shell: cmd
|
|
run: |
|
|
"%programfiles%\7-Zip\7z.exe" a -r netradiant-custom-windows-x86_64.zip "%CD%\Windows-x86_64\*"
|
|
"%programfiles%\7-Zip\7z.exe" a -r netradiant-custom-linux-x86_64.zip "%CD%\Linux-x86_64\*"
|
|
|
|
- name: Create latest build
|
|
uses: ec-/action-automatic-releases@test
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
automatic_release_tag: "latest"
|
|
prerelease: true
|
|
title: Development Build
|
|
files: |
|
|
*.zip
|