Skip to content

Commit 6061eae

Browse files
authored
Share binary artifacts (#58)
1 parent ef6a962 commit 6061eae

1 file changed

Lines changed: 54 additions & 20 deletions

File tree

.github/workflows/main.yml

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,57 @@ name: build
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
compile:
77

8-
runs-on: ${{ matrix.os }}
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
gtest_ver: [ "1.8.0" ]
14+
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Set up Python
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: "3.8"
21+
- name: Install GoogleTest
22+
run: |
23+
wget https://github.com/google/googletest/archive/release-${{ matrix.gtest_ver }}.tar.gz
24+
tar -zxvf release-${{ matrix.gtest_ver }}.tar.gz
25+
cd googletest-release-${{ matrix.gtest_ver }}/googletest
26+
cmake .
27+
sudo make install
28+
- name: Install Boost.Test
29+
run: |
30+
sudo apt-get install libboost-test-dev valgrind
31+
- name: Compile
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install scons
35+
scons -j4 -C tests
36+
- name: Upload compilation results
37+
uses: actions/upload-artifact@v2
38+
with:
39+
name: tests
40+
if-no-files-found: error
41+
retention-days: 1
42+
path: |
43+
tests/
44+
!tests/**/*.py
45+
!tests/**/*.cpp
46+
!tests/**/*.xml
47+
!tests/**/*.o
48+
49+
test:
50+
needs: compile
51+
runs-on: [ubuntu-latest]
952

1053
strategy:
1154
fail-fast: false
1255
matrix:
1356
python: ["2.7", "3.5", "3.6", "3.7", "3.8"]
14-
gtest_ver: ["1.8.0"]
15-
os: [ubuntu-latest]
1657
include:
1758
- python: "2.7"
1859
tox_env: "py27-pytestlatest"
@@ -31,23 +72,16 @@ jobs:
3172
uses: actions/setup-python@v1
3273
with:
3374
python-version: ${{ matrix.python }}
34-
- name: Install GoogleTest
35-
run: |
36-
wget https://github.com/google/googletest/archive/release-${{ matrix.gtest_ver }}.tar.gz
37-
tar -zxvf release-${{ matrix.gtest_ver }}.tar.gz
38-
cd googletest-release-${{ matrix.gtest_ver }}/googletest
39-
cmake .
40-
sudo make install
41-
- name: Install Boost.Test
42-
run: |
43-
sudo apt-get install libboost-test-dev valgrind
44-
- name: Compile
45-
run: |
46-
python -m pip install --upgrade pip
47-
pip install scons
48-
scons -j4 -C tests
75+
- name: Download compiled tests
76+
uses: actions/download-artifact@v2
77+
with:
78+
name: tests
79+
path: tests
4980
- name: Install Tox
5081
run: |
82+
chmod a+x -R tests
83+
ls -la .
84+
ls -la tests
5185
pip install tox
5286
- name: Test
5387
run: |
@@ -77,7 +111,7 @@ jobs:
77111

78112
runs-on: ubuntu-latest
79113

80-
needs: [build, linting]
114+
needs: [test, linting]
81115

82116
steps:
83117
- uses: actions/checkout@v1

0 commit comments

Comments
 (0)