Skip to content

Enhance console functionality with live completion popup and update r… #10

Enhance console functionality with live completion popup and update r…

Enhance console functionality with live completion popup and update r… #10

Workflow file for this run

name: build
permissions:
contents: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
pull_request:
paths-ignore:
- '**.md'
- '*.txt'
- '.gitignore'
- 'docs/**'
- '.install/**'
push:
branches:
- main
paths-ignore:
- '**.md'
- '*.txt'
- '.gitignore'
- 'docs/**'
- '.install/**'
release:
types: [published]
workflow_dispatch:
jobs:
windows-msys:
name: ${{ matrix.btype }} Windows-${{ matrix.cc }} ${{ matrix.arch }}
runs-on: windows-2022
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
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
install: base-devel ${{ matrix.prefix }}-binutils ${{ matrix.prefix }}-make ${{ matrix.prefix }}-${{ matrix.cc }}
msystem: ${{ matrix.msystem }}
path-type: minimal
release: false
update: false
cache: false
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
run: |
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} COMPILE_ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan CNAME=fnquake3-vulkan BUILD_SERVER=0
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} COMPILE_ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'Release'
with:
name: windows-${{ matrix.cc }}-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5
windows-msys32:
name: ${{ matrix.btype }} Windows-msys32 ${{ matrix.arch }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x86, x86_64]
# btype: [Release, Debug]
btype: [Release]
include:
- btype: Release
rule: install
# - btype: Debug
# rule: debug
steps:
- name: Checkout current repo
uses: actions/checkout@v4
- name: Checkout msys32 tools from sibling repo
uses: actions/checkout@v4
with:
repository: ec-/msys32
path: msys
- name: Extract msys32.7z
run: |
7z x %GITHUB_WORKSPACE%/msys/msys32.7z -o%GITHUB_WORKSPACE%/msys
shell: cmd
- name: Prepend msys/bin to PATH
run: |
echo "PATH=$GITHUB_WORKSPACE/msys/mingw/bin;$GITHUB_WORKSPACE/msys/bin;$GITHUB_WORKSPACE/msys" >> $GITHUB_ENV
shell: bash
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
shell: cmd
run: |
make ${{ matrix.rule }} ARCH=${{ matrix.arch }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan CNAME=fnquake3-vulkan BUILD_SERVER=0
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} ARCH=${{ matrix.arch }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
if: matrix.btype == 'Release'
with:
name: windows-mingw-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5
windows-msvc:
name: ${{ matrix.btype }} Windows-MSVC ${{ matrix.arch }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
arch: [arm64, x86, x64]
btype: [Release, Debug]
include:
- arch: arm64
platform: ARM64
suffix: .arm64
pkg_suffix: arm64
- arch: x86
platform: Win32
pkg_suffix: x86
- arch: x64
platform: x64
suffix: .x64
pkg_suffix: x86_64
steps:
- uses: microsoft/setup-msbuild@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
run: |
mkdir bin
msbuild code\win32\msvc2017\fnquake3-ded.vcxproj -p:TargetName=fnquake3.ded,Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }} /p:PlatformToolset=v143
copy code\win32\msvc2017\output\fnquake3.ded.exe bin\fnquake3.ded${{ matrix.suffix }}.exe
msbuild code\win32\msvc2017\fnquake3-ded.vcxproj -p:TargetName=fnquake3.ded,Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }} -t:Clean
msbuild code\win32\msvc2017\renderer.vcxproj -p:Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }} /p:PlatformToolset=v143
msbuild code\win32\msvc2017\fnquake3.vcxproj -p:TargetName=fnquake3,Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }},UseWasapi=USE_WASAPI=0 /p:PlatformToolset=v143
copy code\win32\msvc2017\output\fnquake3.exe bin\fnquake3${{ matrix.suffix }}.exe
msbuild code\win32\msvc2017\renderer.vcxproj -p:Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }} -t:Clean
msbuild code\win32\msvc2017\fnquake3.vcxproj -p:TargetName=fnquake3,Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }},UseWasapi=USE_WASAPI=0 -t:Clean
msbuild code\win32\msvc2017\renderervk.vcxproj -p:Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }} /p:PlatformToolset=v143
msbuild code\win32\msvc2017\fnquake3.vcxproj -p:TargetName=fnquake3,Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }},UseWasapi=USE_WASAPI=0 /p:PlatformToolset=v143
copy code\win32\msvc2017\output\fnquake3.exe bin\fnquake3-vulkan${{ matrix.suffix }}.exe
msbuild code\win32\msvc2017\renderervk.vcxproj -p:Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }} -t:Clean
msbuild code\win32\msvc2017\fnquake3.vcxproj -p:TargetName=fnquake3,Configuration=${{ matrix.btype }},Platform=${{ matrix.platform }},UseWasapi=USE_WASAPI=0 -t:Clean
- uses: actions/upload-artifact@v4
if: ${{ matrix.btype == 'Release' }}
with:
name: windows-msvc-${{ matrix.pkg_suffix }}
path: bin
if-no-files-found: error
retention-days: 5
ubuntu-x86:
name: ${{ matrix.btype }} Ubuntu ${{ matrix.arch }}
runs-on: ubuntu-24.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
- arch: x86
use_sdl: USE_SDL=0
- arch: x86_64
use_sdl: USE_SDL=0
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 libasound2-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 libasound2-dev
fi
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip in Release builds
run: |
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} COMPILE_ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan CNAME=fnquake3-vulkan BUILD_SERVER=0
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} COMPILE_ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'Release'
with:
name: linux-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5
ubuntu-arm:
name: ${{ matrix.btype }} Ubuntu [ARM] ${{ matrix.arch }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
arch: [aarch64, armv7]
cc: [gcc]
btype: [Release, Debug]
include:
- btype: Release
rule: install
- btype: Debug
rule: debug
steps:
- uses: actions/checkout@v4
if: false
with:
submodules: recursive
- name: Build ${{ matrix.arch }}
#if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
if: false
uses: uraimo/run-on-arch-action@v3
with:
arch: ${{ matrix.arch }}
distro: ubuntu24.04
githubToken: ${{ github.token }}
shell: /bin/sh
run: |
apt-get -qq update
apt-get install -y make gcc g++
apt-get -y install libcurl4-openssl-dev mesa-common-dev libxxf86dga-dev libxrandr-dev libxxf86vm-dev libasound-dev
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan CNAME=fnquake3-vulkan BUILD_SERVER=0
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
if: false
#if: matrix.cc == 'gcc' && matrix.btype == 'Release'
with:
name: linux-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5
ubuntu-arm64:
name: ${{ matrix.btype }} Ubuntu ${{ matrix.arch }}
runs-on: ubuntu-22.04-arm
strategy:
fail-fast: false
matrix:
arch: [arm64]
cc: [gcc]
btype: [Release, Debug]
include:
- btype: Release
rule: install
- btype: Debug
rule: debug
steps:
- name: Install tools
run: |
sudo apt-get -qq update
sudo apt-get install -y make gcc g++
sudo apt-get -y install libcurl4-openssl-dev mesa-common-dev libxxf86dga-dev libxrandr-dev libxxf86vm-dev libasound2-dev
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
run: |
make ${{ matrix.rule }} -j$(nproc) ARCH=aarch64 COMPILE_ARCH=aarch64 CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan CNAME=fnquake3-vulkan BUILD_SERVER=0
make clean ARCH=aarch64
make ${{ matrix.rule }} -j$(nproc) ARCH=aarch64 COMPILE_ARCH=aarch64 CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'Release'
with:
name: linux-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5
macos-x86:
name: ${{ matrix.btype }} macOS ${{ matrix.arch }}
runs-on: macos-14
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]
cc: [clang]
btype: [Release, Debug]
include:
- btype: Release
rule: install
- btype: Debug
rule: debug
steps:
- name: Install tools
run: brew install coreutils sdl3 # pkg-config
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
run: |
make ${{ matrix.rule }} -j$(sysctl -n hw.logicalcpu) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=vulkan CNAME=fnquake3-vulkan BUILD_SERVER=0 STRIP=echo
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(sysctl -n hw.logicalcpu) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=0 RENDERER_DEFAULT=opengl STRIP=echo
- uses: actions/upload-artifact@v4
if: matrix.cc == 'clang' && matrix.btype == 'Release'
with:
name: macos-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5
publish-release:
if: ${{ github.event_name == 'release' }}
needs: [windows-msys32, windows-msvc, ubuntu-x86, ubuntu-arm64, macos-x86]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Resolve release version metadata
run: |
echo "FNQ3_BUILD_DATE=$(date -u +%F)" >> "$GITHUB_ENV"
python scripts/version.py github-env --channel release --build-date "$(date -u +%F)" --commit "${GITHUB_SHA}" --ref-name "${GITHUB_REF_NAME}" >> "$GITHUB_ENV"
- name: Package release archives
run: |
python scripts/release.py --channel release --artifact-root artifacts --build-date "${FNQ3_BUILD_DATE}" --commit "${GITHUB_SHA}" --ref-name "${GITHUB_REF_NAME}"
- name: Upload release archives
uses: "svenstaro/upload-release-action@latest"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.FNQ3_RELEASE_TAG }}
overwrite: true
file_glob: true
file: .install/packages/*.zip
- name: Upload release manifest
uses: "svenstaro/upload-release-action@latest"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.FNQ3_RELEASE_TAG }}
overwrite: true
file: .install/release-manifest.json
- name: Upload release checksums
uses: "svenstaro/upload-release-action@latest"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.FNQ3_RELEASE_TAG }}
overwrite: true
file: .install/SHA256SUMS.txt