Skip to content

Commit

Permalink
add continuous integration via GitHub Actions
Browse files Browse the repository at this point in the history
* Windows 32- and 64-bit builds using Visual Studio solution
* Linux builds using GCC and Clang
* macOS x86_64 and arm64 builds using Xcode project
  • Loading branch information
alexey-lysiuk committed Jul 15, 2023
1 parent 83d8db0 commit 9d23c0e
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Linux CI

on: [push, pull_request]

jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: ["clang", "gcc"]

steps:
- uses: actions/checkout@v3

- name: Install Dependencies
run: sudo apt update && sudo apt install libmad0-dev libsdl2-dev libvorbis-dev

- name: Build ${{ matrix.compiler }}
run: make --jobs=3 --keep-going --directory=Quake CC=${{ matrix.compiler }} USE_SDL2=1
25 changes: 25 additions & 0 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: macOS CI

on: [push, pull_request]

jobs:
build-mac-os:
name: Build macOS
runs-on: macos-12
strategy:
fail-fast: false
matrix:
architecture: [x64, M1]

steps:
- uses: actions/checkout@v3

- name: Build ${{ matrix.architecture }}
shell: bash
run: |
set -o pipefail
xcodebuild \
-project MacOSX/QuakeSpasm.xcodeproj \
-configuration Release \
-target QuakeSpasm-SDL2-${{ matrix.architecture }} \
| xcpretty
24 changes: 24 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Windows CI

on: [push, pull_request]

jobs:
build-windows:
name: Build Windows
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
platform: [x64, Win32]

steps:
- uses: actions/checkout@v3

- name: Build ${{ matrix.platform }}
run: |
$vsroot = (Get-VisualStudioInstance).InstallationPath
$devenv = join-path $vsroot "Common7\IDE\devenv.com"
$solution = "Windows/VisualStudio/quakespasm.sln"
& $devenv $solution /Upgrade
& $devenv $solution /Build "Release|${{ matrix.platform }}"
if (-not $?) { throw "Build failed" }

0 comments on commit 9d23c0e

Please # to comment.