Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Coverity for Linux (aarch64)
run-name: Coverity_linux_aarch64
on:
push:
branches:
- 'master'
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_ubuntu_aarch64:
runs-on: ubuntu-24.04-arm
permissions:
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- env: ubuntu
steps:
- name: Install build dependencies
run: |
sudo apt update
sudo apt install libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev \
build-essential
- name: Check out repository code
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Download coverity
run: |
if [ -z "${{ secrets.COVERITY_SCAN_TOKEN }}" ]; then
echo "COVERITY_SCAN_TOKEN is not set. Skipping workflow."
else
wget https://scan.coverity.com/download/cxx/linux-ARM64 \
--post-data "token=${{secrets.COVERITY_SCAN_TOKEN}}&project=${{github.repository}}" \
-O coverity_tool.tgz -cq
tar -xf coverity_tool.tgz
mv -v cov-analysis-linux-arm64-* cov-analysis-linux-arm64
fi
- name: Build
run: |
if [ -z "${{ secrets.COVERITY_SCAN_TOKEN }}" ]; then
echo "COVERITY_SCAN_TOKEN is not set. Skipping workflow."
else
rm -rf cov-int
make clean
cov-analysis-linux-arm64/bin/cov-build --dir cov-int make WITH_SDL3=no -j 4
fi
- name: Upload result
run: |
if [ -z "${{ secrets.COVERITY_SCAN_TOKEN }}" ]; then
echo "COVERITY_SCAN_TOKEN is not set. Skipping workflow."
else
tar -czf cov-int.tgz cov-int
curl --form token=${{secrets.COVERITY_SCAN_TOKEN}} \
--form email=${{secrets.COVERITY_SCAN_EMAIL}} \
--form file=@cov-int.tgz \
--form version="${{github.sha}}" \
--form description="${{github.sha}}" \
https://scan.coverity.com/builds?project=${{github.repository}}
fi
11 changes: 6 additions & 5 deletions .github/workflows/linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ concurrency:
cancel-in-progress: true
jobs:
build_ubuntu_aarch64:
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-latest
container:
image: debian:testing
permissions:
actions: read
contents: read
Expand All @@ -28,8 +30,8 @@ jobs:
steps:
- name: Install build dependencies
run: |
sudo apt update
sudo apt install build-essential snapd
apt update
apt install -y build-essential cppcheck
- name: Check out repository code
uses: actions/checkout@v6
- name: Build
Expand All @@ -53,8 +55,7 @@ jobs:
if-no-files-found: error
- name: Run Cppcheck
run: |
sudo snap install cppcheck --edge
/snap/bin/cppcheck -j 4 --enable=all --output-format=sarif \
cppcheck -j 4 --enable=all --output-format=sarif \
--output-file=cppcheck_results.sarif --inconclusive --library=posix \
-DYQ2OSTYPE=\"Linux\" src
- name: Upload SARIF to GitHub Code Scanning
Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-strict-aliasing -fwrapv")
# Use -O2 as maximum optimization level. -O3 has it's problems with yquake2.
string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")

# Operating system
add_definitions(-DYQ2OSTYPE="${CMAKE_SYSTEM_NAME}")

# Architecture string
string(REGEX REPLACE "amd64" "x86_64" YQ2_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
string(REGEX REPLACE "i.86" "i386" YQ2_ARCH "${YQ2_ARCH}")
string(REGEX REPLACE "^arm.*" "arm" YQ2_ARCH "${YQ2_ARCH}")
add_definitions(-DYQ2ARCH="${YQ2_ARCH}")

# Linker Flags
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
list(APPEND CtfLinkerFlags "-lm")
Expand All @@ -36,6 +45,9 @@ set(Ctf-Source
src/player/trail.c
src/player/view.c
src/player/weapon.c
src/savegame/savegame.c
src/shared/flash.c
src/shared/rand.c
src/shared/shared.c
src/g_ai.c
src/g_chase.c
Expand All @@ -48,7 +60,6 @@ set(Ctf-Source
src/g_misc.c
src/g_monster.c
src/g_phys.c
src/savegame/savegame.c
src/g_spawn.c
src/g_svcmds.c
src/g_target.c
Expand Down
Loading
Loading