build #139
Workflow file for this run
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 | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '*.txt' | |
- '.gitignore' | |
- 'docs/*' | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
- '*.txt' | |
- '.gitignore' | |
- 'docs/*' | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
windows-msys: | |
name: ${{ matrix.btype }} Windows-GCC ${{ matrix.arch }} | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86, x86_64] | |
cc: [gcc] | |
btype: [Release, Debug] | |
include: | |
- arch: x86 | |
msystem: mingw32 | |
prefix: mingw-w64-i686 | |
- arch: x86_64 | |
msystem: mingw64 | |
prefix: mingw-w64-x86_64 | |
- btype: Release | |
rule: install | |
- btype: Debug | |
rule: debug install | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
install: ${{ matrix.prefix }}-binutils ${{ matrix.prefix }}-make ${{ matrix.prefix }}-${{ matrix.cc }} | |
msystem: ${{ matrix.msystem }} | |
path-type: minimal | |
release: false | |
update: false | |
- uses: actions/checkout@v3.1.0 | |
with: | |
submodules: recursive | |
- name: Build | |
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build | |
run: | | |
make clean ARCH=${{ matrix.arch }} | |
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin BUILD_SERVER=0 OMEGA=0 | |
- uses: actions/upload-artifact@v3.1.1 | |
if: matrix.cc == 'gcc' && matrix.btype == 'release' | |
with: | |
name: release-mingw64-${{ matrix.arch }} | |
path: bin | |
if-no-files-found: error | |
retention-days: 5 | |
ubuntu-x86: | |
name: ${{ matrix.btype }} Ubuntu ${{ matrix.arch }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86, x86_64] | |
cc: [gcc] | |
btype: [Release, Debug] | |
include: | |
- btype: Release | |
rule: install | |
- btype: Debug | |
if: ${{ github.event_name != 'release' }} | |
rule: debug install | |
- arch: x86 | |
use_sdl: USE_SDL=0 | |
- arch: x86_64 | |
use_sdl: USE_SDL=1 | |
steps: | |
- name: Install tools | |
run: | | |
if [ ${{ matrix.arch }} == "x86" ]; then | |
sudo dpkg --add-architecture i386 | |
sudo apt-get -qq update | |
sudo apt-get -y install gcc-multilib libcurl4-openssl-dev:i386 mesa-common-dev:i386 libxxf86dga-dev:i386 libxrandr-dev:i386 libxxf86vm-dev:i386 libasound-dev:i386 | |
else | |
sudo apt-get -qq update | |
sudo apt-get -y install libcurl4-openssl-dev mesa-common-dev libxxf86dga-dev libxrandr-dev libxxf86vm-dev libasound-dev libsdl2-dev | |
fi | |
- uses: actions/checkout@v3.1.0 | |
with: | |
submodules: recursive | |
- name: Build | |
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip in Release builds | |
run: | | |
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} BUILD_SERVER=0 OMEGA=0 | |
- uses: actions/upload-artifact@v3.1.1 | |
if: matrix.cc == 'gcc' && matrix.btype == 'release' | |
with: | |
name: release-linux-${{ matrix.arch }} | |
path: bin | |
if-no-files-found: error | |
retention-days: 5 | |
macos-ub2: | |
name: ${{ matrix.btype }} macOS universal2 | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64] | |
cc: [gcc] | |
btype: [Release, Debug] | |
include: | |
- btype: Release | |
rule: install | |
- btype: Debug | |
rule: debug install | |
steps: | |
- name: Install tools | |
run: brew install coreutils pkg-config sdl2 | |
- uses: actions/checkout@v3.1.0 | |
with: | |
submodules: recursive | |
- name: Build | |
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build | |
run: | | |
./make-macosx-ub2.sh | |
- uses: actions/upload-artifact@v3.1.1 | |
if: matrix.cc == 'gcc' && matrix.btype == 'release' | |
with: | |
name: release-darwin-universal2 | |
path: build/release-darwin-universal2 | |
if-no-files-found: error | |
retention-days: 5 | |
create-testing: | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
needs: [windows-msys, ubuntu-x86, macos-ub2] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3.0.1 | |
- name: Create binary archives | |
run: | | |
7z a -r omega-engine-linux-x86.zip ./release-linux-x86 | |
7z a -r omega-engine-linux-x86_64.zip ./release-linux-x86_64 | |
7z a -r omega-engine-windows-x86.zip ./release-mingw64-x86 | |
7z a -r omega-engine-windows-x86_64.zip ./release-mingw64-x86_64 | |
7z a -r omega-engine-macos-universal2.zip ./release-darwin-universal2 | |
- name: Create latest build | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: Development Build (OpenArena as default) | |
files: | | |
*.zip |