mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
add Ubuntu build and torture steps to GH actions
This commit is contained in:
committed by
Ryan Fleury
parent
7b2743a4d6
commit
b4cfc61408
@@ -9,6 +9,39 @@ on:
|
|||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-ubuntu-24-04:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- raddbg
|
||||||
|
- raddbg_non_graphical
|
||||||
|
- radlink
|
||||||
|
- radbin
|
||||||
|
- torture
|
||||||
|
compiler:
|
||||||
|
- clang-22
|
||||||
|
# TODO: - gcc
|
||||||
|
mode:
|
||||||
|
- debug
|
||||||
|
- release
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
|
sudo apt-add-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y clang-22 lld-22 llvm-22 gcc-14 pkg-config libfreetype6-dev libx11-dev libxext-dev libgl1-mesa-dev libegl1-mesa-dev
|
||||||
|
sudo ln -s /usr/bin/llvm-symbolizer-22 /usr/bin/llvm-symbolizer
|
||||||
|
- name: build
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
CC="${{ matrix.compiler }}" ./build.sh "${{ matrix.target }}" "${{ matrix.mode }}"
|
||||||
|
|
||||||
build-windows-2022:
|
build-windows-2022:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
strategy:
|
strategy:
|
||||||
@@ -34,7 +67,47 @@ jobs:
|
|||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||||
call build meta "${{ matrix.target }}" "${{ matrix.compiler }}" "${{ matrix.mode }}" || exit /b 1
|
call build meta "${{ matrix.target }}" "${{ matrix.compiler }}" "${{ matrix.mode }}" || exit /b 1
|
||||||
|
|
||||||
run-torture:
|
run-torture-ubuntu-24-04:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
compiler:
|
||||||
|
- clang-22
|
||||||
|
# TODO: - gcc
|
||||||
|
mode:
|
||||||
|
- debug
|
||||||
|
# TODO: - release
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: install external libraries
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
|
sudo apt-add-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y clang-22 lld-22 llvm-22 gcc-14 pkg-config libfreetype6-dev libx11-dev libxext-dev libgl1-mesa-dev libegl1-mesa-dev
|
||||||
|
sudo ln -s /usr/bin/llvm-symbolizer-22 /usr/bin/llvm-symbolizer
|
||||||
|
- name: run-torture
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
CC="${{ matrix.compiler }}" ./build.sh meta raddbg raddbg_non_graphical radbin radlink torture "${{ matrix.mode }}"
|
||||||
|
cd build
|
||||||
|
./torture --gen_crash_dump
|
||||||
|
- name: upload torture artifacts
|
||||||
|
if: failure()
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: torture-crash-dumps-${{ matrix.compiler }}-${{ matrix.mode }}
|
||||||
|
path: |
|
||||||
|
build/*.core
|
||||||
|
build/*.exe
|
||||||
|
build/*.pdb
|
||||||
|
build/torture_artifacts/**
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
run-torture-windows-2022:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -78,6 +151,6 @@ jobs:
|
|||||||
build/*.dmp
|
build/*.dmp
|
||||||
build/*.exe
|
build/*.exe
|
||||||
build/*.pdb
|
build/*.pdb
|
||||||
build/torture
|
build/torture_artifacts/**
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ set cl_link= /link /MANIFEST:EMBED /INCREMENTAL:NO /pdbaltpath:%%%%_PDB%%%
|
|||||||
set cl_out= /out:
|
set cl_out= /out:
|
||||||
set cl_obj_out= /Fo:
|
set cl_obj_out= /Fo:
|
||||||
set cl_linker=
|
set cl_linker=
|
||||||
set clang_common= -I..\src\ -I..\local\ -fdiagnostics-absolute-paths -Wall -Wno-unknown-warning-option -Wno-missing-braces -Wno-unused-function -Wno-unused-parameter -Wno-writable-strings -Wno-missing-field-initializers -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Wno-compare-distinct-pointer-types -Wno-initializer-overrides -Wno-incompatible-pointer-types-discards-qualifiers -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf -ferror-limit=10000 -mcx16 -msha
|
set clang_common= -mcx16 -msha -I..\src\ -I..\local\ -fdiagnostics-absolute-paths -Wall -Wno-unknown-warning-option -Wno-missing-braces -Wno-unused-function -Wno-unused-parameter -Wno-writable-strings -Wno-missing-field-initializers -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Wno-compare-distinct-pointer-types -Wno-initializer-overrides -Wno-incompatible-pointer-types-discards-qualifiers -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf -ferror-limit=10000
|
||||||
set clang_debug= call clang -g -O0 -DBUILD_DEBUG=1 -D_DEBUG %clang_common% %auto_compile_flags%
|
set clang_debug= call clang -g -O0 -DBUILD_DEBUG=1 -D_DEBUG %clang_common% %auto_compile_flags%
|
||||||
set clang_release= call clang -g -O2 -DBUILD_DEBUG=0 -DNDEBUG %clang_common% %auto_compile_flags%
|
set clang_release= call clang -g -O2 -DBUILD_DEBUG=0 -DNDEBUG %clang_common% %auto_compile_flags%
|
||||||
set clang_link= -fuse-ld=lld -Xlinker /MANIFEST:EMBED -Xlinker /pdbaltpath:%%%%_PDB%%%% -Xlinker /NATVIS:"%~dp0\src\natvis\base.natvis" -Xlinker /opt:ref -Xlinker /opt:noicf
|
set clang_link= -fuse-ld=lld -Xlinker /MANIFEST:EMBED -Xlinker /pdbaltpath:%%%%_PDB%%%% -Xlinker /NATVIS:"%~dp0\src\natvis\base.natvis" -Xlinker /opt:ref -Xlinker /opt:noicf
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ git_hash_full=$(git rev-parse HEAD)
|
|||||||
|
|
||||||
# --- Compile/Link Line Definitions -------------------------------------------
|
# --- Compile/Link Line Definitions -------------------------------------------
|
||||||
cc_cflags_gcc=""
|
cc_cflags_gcc=""
|
||||||
cc_cflags_clang=${cc_sanitize}" -fdiagnostics-absolute-paths -Wno-for-loop-analysis -Wno-incompatible-pointer-types-discards-qualifiers -Wno-initializer-overrides -Wno-compare-distinct-pointer-types -Wno-single-bit-bitfield-constant-conversion -Wno-deprecated-declarations -Wno-writable-strings -Wno-unknown-warning-option -Wno-deprecated-register -Wno-unused-local-typedef"
|
cc_cflags_clang=${cc_sanitize}" -fuse-ld=lld -fdiagnostics-absolute-paths -Wno-for-loop-analysis -Wno-incompatible-pointer-types-discards-qualifiers -Wno-initializer-overrides -Wno-compare-distinct-pointer-types -Wno-single-bit-bitfield-constant-conversion -Wno-deprecated-declarations -Wno-writable-strings -Wno-unknown-warning-option -Wno-deprecated-register -Wno-unused-local-typedef"
|
||||||
cc_common="-I../src/ -I../local/ -D_GNU_SOURCE -g -DBUILD_GIT_HASH=\"$git_hash\" -DBUILD_GIT_HASH_FULL=\"$git_hash_full\" -Wall -Wno-missing-braces -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-value -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf -mcx16"
|
cc_common="-mcx16 -I../src/ -I../local/ -D_GNU_SOURCE -g -DBUILD_GIT_HASH=\"$git_hash\" -DBUILD_GIT_HASH_FULL=\"$git_hash_full\" -Wall -Wno-missing-braces -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-value -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf"
|
||||||
cc_debug="-g -O0 -DBUILD_DEBUG=1 ${cc_common}"
|
cc_debug="-g -O0 -DBUILD_DEBUG=1 ${cc_common}"
|
||||||
cc_release="-g -O2 -DBUILD_DEBUG=0 ${cc_common}"
|
cc_release="-g -O2 -DBUILD_DEBUG=0 ${cc_common}"
|
||||||
cc_link="-lpthread -lm -lrt -ldl"
|
cc_link="-lpthread -lm -lrt -ldl"
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ for %%m in (%MODE_VALUES%) do for %%c in (%CC_VALUES%) do (
|
|||||||
)
|
)
|
||||||
|
|
||||||
rem TODO: unblock asan
|
rem TODO: unblock asan
|
||||||
call build.bat meta %%c %%m raddbg_non_graphical || exit /b 1
|
call build.bat meta %%c %%m raddbg raddbg_non_graphical || exit /b 1
|
||||||
|
|
||||||
rem clang does not compile with asan in release mode because it runs out of memory
|
rem clang does not compile with asan in release mode because it runs out of memory
|
||||||
if "%%c" equ "clang" (
|
if "%%c" equ "clang" (
|
||||||
|
|||||||
+19
-6
@@ -2,11 +2,24 @@
|
|||||||
set -eu
|
set -eu
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# compile our targets
|
target_values=(raddbg raddbg_non_graphical radlink radbin torture)
|
||||||
./build.sh raddbg raddbg_non_graphical radlink radbin torture
|
# TODO: gcc
|
||||||
|
cc_values=(clang)
|
||||||
|
mode_values=(debug release)
|
||||||
|
|
||||||
# run torture
|
for m in "${mode_values[@]}"; do
|
||||||
cd build
|
for c in "${cc_values[@]}"; do
|
||||||
./torture
|
|
||||||
cd ..
|
# nuke artifacts from last run
|
||||||
|
rm -rf build/torture_artifacts
|
||||||
|
|
||||||
|
./build.sh meta "$c" "$m" "${target_values[@]}"
|
||||||
|
|
||||||
|
# run torture
|
||||||
|
cd build
|
||||||
|
./torture "$@"
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user