Update README to include info about pacman #563
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push] | |
env: | |
BUILD_TYPE: Release | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
package_manager: "apt" | |
- os: macos-11.0 | |
package_manager: "brew" | |
- os: windows-2019 | |
package_manager: "vcpkg" | |
steps: | |
- name: Checkout Pangolin | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: "(vcpkg only) Setup cache key" | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
run: | | |
export PACKAGES=$($GITHUB_WORKSPACE/scripts/install_prerequisites.sh -l -m ${{matrix.package_manager}} all) | |
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV | |
- name: "(vcpkg only) Restore any cached ports" | |
uses: lukka/run-vcpkg@v6 | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
with: | |
setupOnly: true | |
vcpkgDirectory: '${{github.workspace}}/scripts/vcpkg' | |
appendedCacheKey: '${{env.PACKAGES}}' | |
vcpkgTriplet: x64-windows | |
- name: "(vcpkg only) Setup CMake Toolchain file" | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
run: | | |
export TOOLCHAIN_FILE="${{github.workspace}}/scripts/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
echo "${{github.workspace}}/scripts/vcpkg" >> $GITHUB_PATH | |
echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> $GITHUB_ENV | |
- name: Install Dependencies | |
run: | | |
echo "vcpkg location: $(which vcpkg)" | |
echo "CMake toolchain file: $TOOLCHAIN_FILE" | |
$GITHUB_WORKSPACE/scripts/install_prerequisites.sh -v -u -m ${{matrix.package_manager}} all | |
- name: Configure CMake | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" -DBUILD_TESTS=ON | |
- name: Build | |
run: cmake --build build --config $BUILD_TYPE | |
- name: Run all tests | |
working-directory: ${{runner.workspace}}/Pangolin/build | |
run: ctest | |
emscripten: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Pangolin | |
uses: actions/checkout@v2 | |
with: | |
path: pangolin | |
- name: Checkout Eigen | |
uses: actions/checkout@v2 | |
with: | |
path: eigen | |
repository: 'libigl/eigen' | |
- name: Create Build Directories | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/eigen-build | |
cmake -E make_directory ${{runner.workspace}}/pangolin-build | |
- name: Start Emscripten Docker | |
run: docker run -dit --name emscripten -v ${{runner.workspace}}:/src emscripten/emsdk:latest bash | |
- name: Configure Eigen | |
run: docker exec -t -w /src/eigen-build emscripten cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE /src/Pangolin/eigen | |
- name: Configure Pangolin | |
run: docker exec -t -w /src/pangolin-build emscripten emcmake cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DEigen3_DIR=/src/eigen-build /src/Pangolin/pangolin | |
- name: Build Pangolin | |
run: docker exec -t -w /src/pangolin-build emscripten cmake --build . | |
- name: Copy Examples to www folder | |
run: | | |
mkdir -p ${{runner.workspace}}/www/emscripten | |
rsync -zarvm --include="*/" --include="*.html" --include="*.js" --include="*.wasm" --exclude="*" ${{runner.workspace}}/pangolin-build/examples ${{runner.workspace}}/www/emscripten | |
- name: Copy README to www folder | |
run: | | |
cp "${{github.workspace}}/pangolin/README.md" "${{runner.workspace}}/www/index.md" | |
- name: Deploy Examples to GitHub Pages (for pushes to master) | |
if: success() && (github.ref == 'refs/heads/master') | |
uses: crazy-max/[email protected] | |
with: | |
target_branch: gh-pages | |
keep_history: true | |
# build_dir path relative to ${{runner.workspace}}/Pangolin | |
build_dir: ../www | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |