Skip to content

Commit

Permalink
CI: Linux workflow now fails on warning(s).
Browse files Browse the repository at this point in the history
  • Loading branch information
capnm committed May 21, 2023
1 parent 3da8d04 commit c256ef5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 30 deletions.
51 changes: 30 additions & 21 deletions .github/workflows/build_linux_bin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Linux_bin

env:
cl_ver: 17
clang_v: 17
clang_v_dyn: 16

on:
push:
Expand All @@ -20,10 +21,8 @@ jobs:
#echo "===== apt-get update ====="
#sudo apt-get update
echo
echo "===== ninja ====="
sudo apt-get install ninja-build
echo
sudo apt-get install colorized-logs
echo "===== ninja, (anti-)colorized-logs ====="
sudo apt-get install ninja-build colorized-logs
echo
#echo "===== multilib ====="
#sudo apt-get install gcc-multilib g++-multilib
Expand All @@ -44,22 +43,22 @@ jobs:
echo "===== clang-12 ====="
clang-12 -v
echo
echo "===== install clang-$cl_ver ====="
echo "===== install clang-$clang_v ====="
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $cl_ver >/dev/null
sudo ./llvm.sh $clang_v >/dev/null
echo
echo "===== clang-$cl_ver ====="
clang-$cl_ver -v
echo "===== clang-$clang_v ====="
clang-$clang_v -v
echo "Setup meson OK"
- name: Build
run: |
mkdir ${{github.workspace}}/thorvg
#meson setup --prefix=${{github.workspace}}/thorvg --default-library static -Dlog=true -Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build .
CC=clang-$cl_ver CXX=clang++-$cl_ver meson setup --prefix=${{github.workspace}}/thorvg \
CC=clang-$clang_v CXX=clang++-$clang_v meson setup --prefix=${{github.workspace}}/thorvg \
--default-library static -Dlog=true -Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build . | tee ${{github.workspace}}/thorvg/log.txt
meson compile -C ${{github.workspace}}/build | tee -a ${{github.workspace}}/thorvg/log.txt
Expand Down Expand Up @@ -108,8 +107,8 @@ jobs:
#echo "===== apt-get update ====="
#sudo apt-get update
echo
echo "===== ninja ====="
sudo apt-get install ninja-build
echo "===== ninja, (anti-)colorized-logs ====="
sudo apt-get install ninja-build colorized-logs
echo
#echo "===== multilib ====="
#sudo apt-get install gcc-multilib g++-multilib
Expand All @@ -130,32 +129,40 @@ jobs:
echo "===== clang-12 ====="
clang-12 -v
echo
echo "===== install clang 16 ====="
echo "===== install clang $clang_v_dyn ====="
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 >/dev/null
sudo ./llvm.sh $clang_v_dyn >/dev/null
echo
echo "===== clang-16 ====="
clang-16 -v
echo "===== clang-$clang_v_dyn ====="
clang-$clang_v_dyn -v
echo "Setup meson OK"
# Note: set LD_LIBRARY_PATH to nonstandart dynanmic library location

- name: Build
run: |
CC=clang-16 CXX=clang++-16 meson setup --prefix=${{github.workspace}}/thorvg -Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build .
mkdir ${{github.workspace}}/thorvg
CC=clang-$clang_v_dyn CXX=clang++-$clang_v_dyn meson setup --prefix=${{github.workspace}}/thorvg \
-Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build . | tee ${{github.workspace}}/thorvg/log.txt
#meson compile -C ${{github.workspace}}/build
meson compile -C ${{github.workspace}}/build --verbose
meson install -C ${{github.workspace}}/build
meson compile -C ${{github.workspace}}/build --verbose | tee -a ${{github.workspace}}/thorvg/log.txt
meson install -C ${{github.workspace}}/build | tee -a ${{github.workspace}}/thorvg/log.txt
cp -v ${{github.workspace}}/build/src/libthorvg.*/*.symbols ${{github.workspace}}/thorvg/lib/x86_64-linux-gnu/
echo
#chmod a+x ${{github.workspace}}/thorvg/bin/*
echo "tree"
tree -h ${{github.workspace}}/thorvg
tree -h ${{github.workspace}}/thorvg | tee -a ${{github.workspace}}/thorvg/log.txt
echo "ldd svg2png"
LD_LIBRARY_PATH="${{github.workspace}}/thorvg/lib/x86_64-linux-gnu" \
ldd ${{github.workspace}}/thorvg/bin/svg2png
ldd ${{github.workspace}}/thorvg/bin/svg2png | tee -a ${{github.workspace}}/thorvg/log.txt
echo
echo "svg2png src/examples/images/eu.svg"
LD_LIBRARY_PATH="${{github.workspace}}/thorvg/lib/x86_64-linux-gnu" \
${{github.workspace}}/thorvg/bin/svg2png src/examples/images/eu.svg | ansi2txt | tee -a ${{github.workspace}}/thorvg/log.txt
- name: Tar files
run: |
Expand All @@ -167,3 +174,5 @@ jobs:
name: thorvg_lin_dynamic
path: ${{github.workspace}}/tar

- name: Test
run: if fgrep -iq warning ${{github.workspace}}/thorvg/log.txt; then echo "[E] CI warning(s), see log.txt."; exit 1; fi
21 changes: 12 additions & 9 deletions .github/workflows/build_mac_bin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ jobs:
- name: Build
shell: bash
run: |
mkdir ${{github.workspace}}/thorvg/
CC=$(brew --prefix llvm@15)/bin/clang CXX=$(brew --prefix llvm@15)/bin/clang++ meson setup --prefix=${{github.workspace}}/thorvg -Dlog=true \
-Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build .
-Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build . | tee -a ${{github.workspace}}/thorvg/log.txt
#meson compile -C ${{github.workspace}}/build
meson compile -C ${{github.workspace}}/build --verbose
meson install -C ${{github.workspace}}/build
#meson compile -C ${{github.workspace}}/build | tee -a ${{github.workspace}}/thorvg/log.txt
meson compile -C ${{github.workspace}}/build --verbose | tee -a ${{github.workspace}}/thorvg/log.txt
meson install -C ${{github.workspace}}/build | tee -a ${{github.workspace}}/thorvg/log.txt
echo "tree"
tree -h ${{github.workspace}}/thorvg/
tree -h ${{github.workspace}}/thorvg/ | tee -a ${{github.workspace}}/thorvg/log.txt
- name: Tar files
run: |
Expand Down Expand Up @@ -94,15 +95,17 @@ jobs:
- name: Build
shell: bash
run: |
mkdir ${{github.workspace}}/thorvg/
CC=$(brew --prefix llvm@15)/bin/clang CXX=$(brew --prefix llvm@15)/bin/clang++ meson setup --prefix=${{github.workspace}}/thorvg \
--default-library static -Dlog=true -Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build .
--default-library static -Dlog=true -Dsavers="all" -Dbindings="capi" -Dtools="all" ${{github.workspace}}/build . | tee -a ${{github.workspace}}/thorvg/log.txt
meson compile -C ${{github.workspace}}/build
meson compile -C ${{github.workspace}}/build | tee -a ${{github.workspace}}/thorvg/log.txt
#meson compile -C ${{github.workspace}}/build --verbose
meson install -C ${{github.workspace}}/build
meson install -C ${{github.workspace}}/build | tee -a ${{github.workspace}}/thorvg/log.txt
echo "tree"
tree -h ${{github.workspace}}/thorvg/
tree -h ${{github.workspace}}/thorvg/ | tee -a ${{github.workspace}}/thorvg/log.txt
- name: Tar files
run: |
Expand Down

0 comments on commit c256ef5

Please sign in to comment.