-
Notifications
You must be signed in to change notification settings - Fork 6
86 lines (83 loc) · 2.55 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: docker
on:
push:
branches:
- 'main'
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push to tag
uses: docker/build-push-action@v3
with:
context: ./docker/voicexx_env
cache-from: type=registry,ref=ghcr.io/gyselax/voicexx_env:latest
pull: true
push: true
tags: ghcr.io/gyselax/voicexx_env:${{ github.sha }}
-
name: Build and push latest
if: github.event_name == 'push' && github.ref_name == 'main'
uses: docker/build-push-action@v3
with:
context: ./docker/voicexx_env
cache-from: type=registry,ref=ghcr.io/gyselax/voicexx_env:latest
pull: true
push: true
tags: ghcr.io/gyselax/voicexx_env:latest
tests:
runs-on: ubuntu-latest
needs: docker
steps:
-
name: Checkout gyselalibxx
uses: actions/checkout@v3
with: { submodules: recursive }
-
name: Run tests
run: |
cat<<-EOF > run.sh
set -xe
git config --global --add safe.directory /src/vendor/kokkos
cmake -DCMAKE_CXX_FLAGS=-Wall -DBUILD_BENCHMARKS=ON -DKokkos_ENABLE_DEPRECATED_CODE_3=OFF -DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF /src
make -j 2 VERBOSE=1
ctest --output-on-failure --timeout 5 -LE test_on_Release_only
EOF
docker run -v ${PWD}:/src:ro ghcr.io/gyselax/voicexx_env:${{ github.sha }} bash /src/run.sh
tests_Release:
runs-on: ubuntu-latest
needs: docker
steps:
-
name: Checkout gyselalibxx
uses: actions/checkout@v3
with: { submodules: recursive }
-
name: Run tests
run: |
cat<<-EOF > run.sh
set -xe
git config --global --add safe.directory /src/vendor/kokkos
cmake -DCMAKE_CXX_FLAGS=-Wall -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_DEPRECATED_CODE_3=OFF -DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF /src
make -j 2 VERBOSE=1
ctest --output-on-failure --timeout 5
EOF
docker run -v ${PWD}:/src:ro ghcr.io/gyselax/voicexx_env:${{ github.sha }} bash /src/run.sh