-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (58 loc) · 2.02 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
name: Test generators
on: [pull_request, push]
env:
IMAGE_NAME: generators
IMAGE_PATH: /tmp/generators.tar
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365
- uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
tags: ${{ env.IMAGE_NAME }}:test
outputs: type=docker,dest=${{ env.IMAGE_PATH }}
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ${{ env.IMAGE_NAME }}
path: ${{ env.IMAGE_PATH }}
build-test-libs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
with:
toolchain: "1.74"
default: true
- uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b
with:
command: build
args: --package compatibility-test
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: test-libs
path: |
target/debug/libcompatibility_test.so
target/debug/libcompatibility_test.a
test:
runs-on: ubuntu-latest
needs: [build-docker, build-test-libs]
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: ${{ env.IMAGE_NAME }}
path: /tmp
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: test-libs
path: target/debug
- name: Load docker image
run: |
docker load --input ${{ env.IMAGE_PATH }}
- name: Run tests
run: |
sudo ./test_generators.sh