Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchicn committed Oct 14, 2020
1 parent 1833100 commit dca14ec
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 58 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,9 @@ on:
branches: [ master ]

jobs:
coveralls:
name: 'for coveralls'
runs-on: ubuntu-latest
steps:
- name: 'install dependencies'
run: |
sudo apt-get update
sudo apt-get install valgrind gcovr
sudo pip install wheel
sudo pip install cpp-coveralls
- name: 'checkout the project'
uses: actions/checkout@v2
- name: 'update submodules'
run: |
git submodule update --init external/rapidjson
git submodule update --init external/draco
- name: 'build and make'
run: |
mkdir build && cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DLIBGLTF_CHARACTOR_ENCODING=UTF8 -DLIBGLTF_BUILD_GCOV=TRUE ../
make
cd ../
- name: 'run valgrind and gcovr'
run: |
cd build
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/nothing.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF/Monster.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF-Binary/Monster.glb
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF-Draco/Monster.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF-Embedded/Monster.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Avocado/glTF-pbrSpecularGlossiness/Avocado.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Cameras/glTF/Cameras.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/EnvironmentTest/glTF/EnvironmentTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/EnvironmentTest/glTF-IBL/EnvironmentTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/MorphPrimitivesTest/glTF/MorphPrimitivesTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Triangle/glTF/Triangle.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/TriangleWithoutIndices/glTF/TriangleWithoutIndices.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/TwoSidedPlane/glTF/TwoSidedPlane.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/UnlitTest/glTF/UnlitTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/VertexColorTest/glTF/VertexColorTest.gltf
gcov source/runtest/CMakeFiles/runtest.dir/runtest.cpp.gcda
gcovr --root=../source/ .
cd ../
coveralls --repo-token ${{ secrets.COVERALLS_REPO_TOKEN }} --exclude ./external/ --exclude ./tools/ --exclude ./build/CMakeFiles/ --exclude ./output/include/ --gcov-options '\-lp'
linux:
name: 'for linux'
runs-on: ubuntu-latest
needs: coveralls
steps:
- name: 'checkout the project'
uses: actions/checkout@v2
Expand All @@ -77,7 +31,6 @@ jobs:
macos:
name: 'for macos'
runs-on: macos-latest
needs: coveralls
steps:
- name: 'checkout the project'
uses: actions/checkout@v2
Expand All @@ -99,7 +52,6 @@ jobs:
ios_iphoneos:
name: 'for ios iphoneos'
runs-on: macos-latest
needs: coveralls
steps:
- name: 'checkout the project'
uses: actions/checkout@v2
Expand All @@ -123,7 +75,6 @@ jobs:
windows_win64:
name: 'for windows win64'
runs-on: windows-latest
needs: coveralls
steps:
- name: 'checkout the project'
uses: actions/checkout@v2
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/buildwithdraco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ jobs:
name: 'for linux'
runs-on: ubuntu-latest
steps:
- name: 'install dependencies'
run: |
sudo apt-get update
sudo apt-get install valgrind gcovr
sudo pip install wheel
sudo pip install cpp-coveralls
- name: 'checkout the project'
uses: actions/checkout@v2
- name: 'update submodules'
Expand Down Expand Up @@ -80,12 +74,12 @@ jobs:
mkdir iphoneos && cd iphoneos
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../external/ios-cmake/toolchain/iOS.cmake -DIOS_PLATFORM=OS -DLIBGLTF_PLATFORM_IOS=TRUE -DLIBGLTF_CHARACTOR_ENCODING=UTF8 -DLIBGLTF_USE_GOOGLE_DRACO=TRUE -DLIBGLTF_USE_GOOGLE_DRACO_SUBMODULE=TRUE ../../
make libgltf
cd ..
cd ..
cd ../
cd ../
- name: 'ready artifact'
run: |
rsync -a --include='*.h' -f 'hide,! */' external/draco/src/draco/ output/include/draco/
cp build/external/draco/dracodec.a output/lib/ios_OS/dracodec.a
cp build/iphoneos/external/draco/dracodec.a output/lib/ios_OS/dracodec.a
- name: 'upload artifact'
uses: actions/upload-artifact@v1.0.0
with:
Expand Down Expand Up @@ -115,6 +109,9 @@ jobs:
- name: 'ready artifact'
run: |
xcopy external\draco\src\draco\*.h output\include\draco\ /E/H/C/I/D/S/Y
dir build\
dir build\win64\
dir build\win64\external\draco
xcopy build\win64\draco\ output\include\draco\ /E/H/C/I/D/S/Y
xcopy build\win64\external\draco\RelWithDebInfo\ output\lib\win64\RelWithDebInfo\ /E/H/C/I/D/S/Y
xcopy build\win64\external\draco\Release\ output\lib\win64\Release\ /E/H/C/I/D/S/Y
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
coveralls:
name: 'for coveralls'
runs-on: ubuntu-latest
steps:
- name: 'install dependencies'
run: |
sudo apt-get update
sudo apt-get install valgrind gcovr
sudo pip install wheel
sudo pip install cpp-coveralls
- name: 'checkout the project'
uses: actions/checkout@v2
- name: 'update submodules'
run: |
git submodule update --init external/rapidjson
git submodule update --init external/draco
- name: 'build and make'
run: |
mkdir build && cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DLIBGLTF_CHARACTOR_ENCODING=UTF8 -DLIBGLTF_BUILD_GCOV=TRUE ../
make
cd ../
- name: 'run valgrind and gcovr'
run: |
cd build
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/nothing.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF/Monster.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF-Binary/Monster.glb
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF-Draco/Monster.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Monster/glTF-Embedded/Monster.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Avocado/glTF-pbrSpecularGlossiness/Avocado.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Cameras/glTF/Cameras.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/EnvironmentTest/glTF/EnvironmentTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/EnvironmentTest/glTF-IBL/EnvironmentTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/MorphPrimitivesTest/glTF/MorphPrimitivesTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/Triangle/glTF/Triangle.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/TriangleWithoutIndices/glTF/TriangleWithoutIndices.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/TwoSidedPlane/glTF/TwoSidedPlane.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/UnlitTest/glTF/UnlitTest.gltf
valgrind --leak-check=full --show-leak-kinds=all ./../output/bin/linux/runtest --coveralls ../resource/2.0/VertexColorTest/glTF/VertexColorTest.gltf
gcov source/runtest/CMakeFiles/runtest.dir/runtest.cpp.gcda
gcovr --root=../source/ .
cd ../
coveralls --repo-token ${{ secrets.COVERALLS_REPO_TOKEN }} --exclude ./external/ --exclude ./tools/ --exclude ./build/CMakeFiles/ --exclude ./output/include/ --gcov-options '\-lp'

0 comments on commit dca14ec

Please sign in to comment.