-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (63 loc) · 1.79 KB
/
rostest.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
name: rostest
on:
workflow_call:
secrets:
PUSH_TOKEN:
required: true
workflow_dispatch:
env:
BASE_IMAGE: ctumrs/ros_noetic:latest
BUILDER_IMAGE: noetic_builder_amd_${{github.RUN_ID}}
ARTIFACTS_FOLDER: /tmp/artifacts
VARIANT: unstable
PUSH_TOKEN: ${{secrets.PUSH_TOKEN}}
jobs:
prime-image:
runs-on: ubuntu-22.04
env:
PUSH_TOKEN: ${{secrets.PUSH_TOKEN}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Checkout CI scripts
uses: actions/checkout@v3
with:
repository: ctu-mrs/ci_scripts
ref: master
path: ci_scripts
- id: prime_image
run: |
./ci_scripts/docker/prime_image_testing/prime_image.sh ${{env.BASE_IMAGE}} ${{env.BUILDER_IMAGE}} ${{env.VARIANT}} ${{env.ARTIFACTS_FOLDER}} ${{github.event.repository.name}}
test-job:
needs: prime-image
runs-on: ubuntu-22.04
timeout-minutes: 360 # 6 hour timeout
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Checkout CI scripts
uses: actions/checkout@v3
with:
repository: ctu-mrs/ci_scripts
ref: master
path: ci_scripts
token: ${{secrets.PUSH_TOKEN}}
- id: build
run: |
./ci_scripts/ros_test/run_test.sh $PWD ${{env.BUILDER_IMAGE}} ${{github.event.repository.name}}
delete_builder:
needs: test-job
if: always()
runs-on: ubuntu-22.04
steps:
- name: Delete old images
uses: dataaxiom/ghcr-cleanup-action@v1
with:
packages: '${{github.event.repository.name}}'
older-than: 7 days
keep-n-tagged: 1
token: ${{secrets.PUSH_TOKEN}}