Skip to content

Commit 0189f93

Browse files
committed
GitHub: Test non-default opts/strict comp warnings
1 parent 748485b commit 0189f93

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,35 @@ jobs:
6060
if: ${{github.event_name != 'pull_request'}}
6161
run: |
6262
aws s3 sync --acl public-read --delete $HOME/src/vgl.nightly/latest/files/ s3://virtualgl-pr/${{env.BRANCH}}/${{github.job}}/
63+
linux-non-default-options:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Set global environment variables
67+
run: |
68+
echo "BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}" >$GITHUB_ENV
69+
echo "LJT_URL=https://s3.amazonaws.com/libjpeg-turbo-pr/3.0.x/linux" >>$GITHUB_ENV
70+
- name: Check out code
71+
uses: actions/checkout@v4
72+
- name: Set up build
73+
run: |
74+
sudo apt update
75+
sudo apt install -y libegl1-mesa-dev libfltk1.3-dev libxtst-dev
76+
mkdir $HOME/libjpeg-turbo-deb
77+
pushd $HOME/libjpeg-turbo-deb
78+
wget --no-check-certificate $LJT_URL/libjpeg-turbo-official_$LJT_VERSION\_amd64.deb $LJT_URL/libjpeg-turbo-official32_$LJT_VERSION\_amd64.deb
79+
sudo dpkg -i *.deb
80+
rm *.deb
81+
popd
82+
rmdir $HOME/libjpeg-turbo-deb
83+
- name: Build
84+
run: |
85+
mkdir build
86+
pushd build
87+
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo \
88+
-DVGL_EGLBACKEND=0 -DVGL_FAKEOPENCL=0 -DVGL_FAKEXCB=0 -DVGL_SYSTEMFLTK=1 -DVGL_USESSL=1 -DVGL_USEXV=0 \
89+
-DCMAKE_C_FLAGS='-ansi -Wall -Werror -Wextra -Wno-missing-field-initializers -Wformat-overflow=2 -Wformat=2 -Wformat-truncation=2 -Wmissing-include-dirs -Wshift-overflow=2 -Wunused -Wno-unused-parameter -Wunused-const-variable=1 -Wuninitialized -Wstrict-overflow=2 -Wstringop-overflow=4 -Wstringop-truncation -Wduplicated-branches -Wduplicated-cond -Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations -Wpointer-arith -Wundef -Wcast-align -Wjump-misses-init -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wvariadic-macros -Wdisabled-optimization' \
90+
-DCMAKE_CXX_FLAGS='-ansi -Wall -Werror -Wextra -Wpedantic -pedantic-errors -Wno-missing-field-initializers -Wformat-overflow=2 -Wformat=2 -Wno-format-nonliteral -Wmissing-include-dirs -Wshift-overflow=2 -Wunused -Wno-unused-parameter -Wunused-const-variable=1 -Wuninitialized -Wstrict-overflow=2 -Wstringop-overflow=4 -Wstringop-truncation -Wduplicated-branches -Wduplicated-cond -Wshadow -Wunsafe-loop-optimizations -Wpointer-arith -Wundef -Wcast-align -Wcatch-value=3 -Wextra-semi -Wlogical-op -Wpacked -Wredundant-decls -Winline -Wvariadic-macros -Wdisabled-optimization' \
91+
..
92+
export NUMCPUS=`grep -c '^processor' /proc/cpuinfo`
93+
make -j$NUMCPUS --load-average=$NUMCPUS
94+
popd

0 commit comments

Comments
 (0)