-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1 KB
/
ci-cmake_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: CMake Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Download and unzip pytorch C++ distribution
run: |
wget -P ~/ https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
unzip ~/libtorch-shared-with-deps-latest.zip -d ~/
rm ~/libtorch-shared-with-deps-latest.zip
working-directory: ${{runner.workspace}}
- name: Configure CMake
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build .
- name: Test
working-directory: ${{runner.workspace}}/build
run: GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V
- name: Upload test results
uses: actions/upload-artifact@v2
if: failure()
with:
name: test_results_xml
path: ${{runner.workspace}}/build/test-results/**/*.xml