Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmp_tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Loidolt
cmp_tool
Commits
179d6b6e
Commit
179d6b6e
authored
11 months ago
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
Add github action to compile with Werror and run tests
parent
1b005047
No related branches found
No related tags found
1 merge request
!34
Update cmp_tool to version v0.13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/test.yml
+145
-0
145 additions, 0 deletions
.github/workflows/test.yml
meson.build
+1
-1
1 addition, 1 deletion
meson.build
with
146 additions
and
1 deletion
.github/workflows/test.yml
0 → 100644
+
145
−
0
View file @
179d6b6e
name
:
Test Runner
on
:
[
push
]
permissions
:
contents
:
read
jobs
:
unix-build-test
:
strategy
:
fail-fast
:
false
# 'false' means Don't stop matrix workflows even if some matrix failed.
matrix
:
include
:
-
{
os
:
ubuntu-latest
,
extra_opt
:
"
"
}
-
{
os
:
macos-latest
,
extra_opt
:
"
"
}
runs-on
:
${{ matrix.os }}
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
actions/setup-python@v5
with
:
python-version
:
'
3.x'
-
name
:
Install packages
run
:
pip install meson ninja pytest
-
name
:
${{ matrix.os }} meson setup
run
:
|
meson setup \
--buildtype=debugoptimized \
-Db_sanitize=address,undefined \
-Db_lundef=false \
${{ matrix.extra_opt }} \
-Dwerror=true \
builddir
-
name
:
build cmp_tool
run
:
meson compile -C builddir/ cmp_tool
-
name
:
run tests
run
:
meson test -C builddir/ --print-errorlogs --timeout-multiplier
3
-
uses
:
actions/upload-artifact@v4
if
:
failure()
with
:
name
:
${{ matrix.os }} Testlog
path
:
builddir/meson-logs/testlog.txt
ubuntu-32-build-test
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
actions/setup-python@v5
with
:
python-version
:
'
3.x'
-
name
:
Install packages
run
:
|
pip install meson ninja pytest
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib
-
name
:
32 bit compilation
run
:
|
meson setup \
--buildtype=debugoptimized \
-Db_sanitize=address,undefined \
-Db_lundef=false \
-Dc_args="-m32" \
-Dc_link_args="-m32" \
-Dwerror=true \
builddir
meson compile -C builddir cmp_tool
-
name
:
run tests
run
:
meson test -C builddir --print-errorlogs --timeout-multiplier
3
-
uses
:
actions/upload-artifact@v4
if
:
failure()
with
:
name
:
32 bit Testlog
path
:
builddir/meson-logs/testlog.txt
mingw-cross-compilation
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
actions/setup-python@v5
with
:
python-version
:
'
3.x'
-
name
:
Install packages
run
:
|
pip install meson ninja pytest
sudo apt-get update
sudo apt-get install gcc-mingw-w64 wine64
-
name
:
mingw cross-compilation and testing
run
:
|
meson setup \
--cross-file=mingw-w64-64.txt \
--buildtype=debugoptimized \
-Dwerror=true \
builddir_cross_win
meson compile -C builddir_cross_win cmp_tool
-
name
:
run tests
run
:
meson test -C builddir_cross_win --print-errorlogs --timeout-multiplier
3
-
uses
:
actions/upload-artifact@v4
if
:
failure()
with
:
name
:
MinGW cross compile Testlog
path
:
builddir_cross_win/meson-logs/testlog.txt
mingw-build-test
:
runs-on
:
windows-latest
defaults
:
run
:
shell
:
msys2 {0}
strategy
:
fail-fast
:
false
# 'false' means Don't stop matrix workflows even if some matrix failed.
matrix
:
include
:
-
{
sys
:
mingw64
,
env
:
x86_64
}
-
{
sys
:
mingw32
,
env
:
i686
}
-
{
sys
:
ucrt64
,
env
:
ucrt-x86_64
}
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
msys2/setup-msys2@v2
with
:
msystem
:
${{matrix.sys}}
# update: true
install
:
>-
mingw-w64-${{matrix.env}}-meson
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-ca-certificates
mingw-w64-${{matrix.env}}-python-pytest
ruby
patch
-
name
:
build
run
:
|
CC=gcc \
meson setup \
--buildtype=debugoptimized \
-Dwerror=true \
builddir
meson compile -C builddir cmp_tool
-
name
:
run tests
run
:
meson test -C builddir --print-errorlogs --timeout-multiplier
3
-
uses
:
actions/upload-artifact@v4
if
:
failure()
with
:
name
:
${{matrix.sys}} Windows Testlog
path
:
builddir/meson-logs/testlog.txt
This diff is collapsed.
Click to expand it.
meson.build
+
1
−
1
View file @
179d6b6e
...
...
@@ -23,7 +23,7 @@ add_global_arguments('-Wno-long-long', language : 'c')
cc_flags
=
[
'-DDEBUGLEVEL=@0@'
.
format
(
debug_level
)]
if
use_debug
debug_flags
=
[
'-Wstrict-aliasing
=1
'
,
'-Wstrict-aliasing'
,
'-Wcast-align'
,
'-Wredundant-decls'
,
'-Wundef'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment