Skip to content

build

build #77

Workflow file for this run

name: build
on: [workflow_dispatch]
jobs:
windows-msys:
name: ${{ matrix.config }} Windows ${{ matrix.arch }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
arch: [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 git p7zip
msystem: ${{ matrix.msystem }}
path-type: minimal
release: false
update: false
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
make MAKEFILE_CONF=msys2-Makefile.conf -j4
mkdir -p install/settings
7z a Windows-${{ matrix.arch }}.zip ./install/*
# zip immediately, since .bla files and empty folders get lost somewhere later otherwise
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}
path: Windows-${{ matrix.arch }}.zip
if-no-files-found: error
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@v4
with:
submodules: recursive
- name: Build
run: |
make CXXFLAGS="-Wno-deprecated-copy" -j4
7z a Linux-${{ matrix.arch }}.7z ./install/*
# 7z to preserve file permissions
- uses: actions/upload-artifact@v4
with:
name: Linux-${{ matrix.arch }}
path: Linux-${{ matrix.arch }}.7z
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: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Create binary archives
shell: bash
run: |
mv Windows-x86_64/Windows-x86_64.zip netradiant-custom-$(date +%Y%m%d)-windows-x86_64.zip
mv Linux-x86_64/Linux-x86_64.7z netradiant-custom-$(date +%Y%m%d)-linux-x86_64.7z
# note: 7z dir/* doesn't match .bla (hidden) file in linux under dir/ but matches in subfolders # or doesn't match there now too?
- name: Get current date
run: |
echo "MY_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Create latest build
uses: Garux/action-automatic-releases@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: ${{ env.MY_DATE }}
prerelease: false
title: Latest Build
files: |
*.zip
*.7z