fix ci #4
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: WeDPR-Component ci(cpp) | |
on: | |
push: | |
paths-ignore: | |
- "docs/**" | |
- "Changelog.md" | |
- "README.md" | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
- "Changelog.md" | |
- "README.md" | |
release: | |
types: [published, push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12, ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 5 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2022-07-28 | |
override: true | |
- name: Prepare vcpkg | |
if: runner.os != 'Windows' | |
uses: friendlyanon/setup-vcpkg@v1 | |
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 } | |
- uses: actions/cache@v2 | |
id: deps_cache | |
with: | |
path: | | |
deps/ | |
c:/vcpkg | |
!c:/vcpkg/.git | |
!c:/vcpkg/buildtrees | |
!c:/vcpkg/packages | |
!c:/vcpkg/downloads | |
key: build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }} | |
restore-keys: | | |
build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }} | |
build-${{ matrix.os }}-${{ github.base_ref }}- | |
build-${{ matrix.os }}- | |
- name: Build for linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt install -y lcov ccache wget libgmp-dev python3-dev | |
export GCC='gcc-10' | |
export CXX='g++-10' | |
bash cpp/tools/install_depends.sh -o ubuntu | |
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ | |
make -j3 | |
- name: Build for macos | |
if: runner.os == 'macOS' | |
run: | | |
bash cpp/tools/install_depends.sh -o macos | |
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ | |
make -j3 | |
- name: Test | |
if: runner.os != 'Windows' | |
run: | | |
cd cpp/build && CTEST_OUTPUT_ON_FAILURE=TRUE ctest | |
make cov | |
- uses: webiny/[email protected] | |
id: post-run-command | |
with: | |
if: runner.os == 'Linux' | |
run: cat vcpkg/buildtrees/libhdfs3/config-x64-linux-dbg-err.log | |
working-directory: /home/runner/work/WeDPR-Component/WeDPR-Component/ |