@@ -13,36 +13,10 @@ jobs:
13
13
with :
14
14
label : run-build-and-test-differential
15
15
16
- start-runner :
17
- name : Start self-hosted EC2 runner
16
+ build-and-test-differential :
18
17
needs : prevent-no-label-execution
19
18
if : ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
20
- runs-on : ubuntu-latest
21
- outputs :
22
- label : ${{ steps.start-ec2-runner.outputs.label }}
23
- ec2-instance-id : ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
24
- steps :
25
- - name : Configure AWS credentials
26
- uses : aws-actions/configure-aws-credentials@v2
27
- with :
28
- aws-access-key-id : ${{ secrets.EC2_ON_DEMAND_AWS_ACCESS_KEY_ID_COMMON }}
29
- aws-secret-access-key : ${{ secrets.EC2_ON_DEMAND_AWS_SECRET_ACCESS_KEY_COMMON }}
30
- aws-region : ${{ secrets.EC2_ON_DEMAND_AWS_REGION_COMMON }}
31
- - name : Start EC2 runner
32
- id : start-ec2-runner
33
- uses : machulav/ec2-github-runner@v2
34
- with :
35
- mode : start
36
- github-token : ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_MFC }}
37
- ec2-image-id : ami-092a175a6ad1aad7a
38
- ec2-instance-type : c6a.xlarge
39
- subnet-id : subnet-070b3d46464230127
40
- security-group-id : sg-0cca5762919221f16
41
- runner-home-dir : /home/ubuntu/actions-runner
42
-
43
- build-and-test-differential :
44
- needs : start-runner
45
- runs-on : ${{ needs.start-runner.outputs.label }}
19
+ runs-on : [self-hosted, linux, X64]
46
20
container : ${{ matrix.container }}${{ matrix.container-suffix }}
47
21
strategy :
48
22
fail-fast : false
96
70
flags : differential
97
71
98
72
clang-tidy-differential :
99
- needs : build-and-test-differential
100
- runs-on : ${{ needs.start-runner.outputs.label }}
73
+ runs-on : [self-hosted, linux, X64]
101
74
container : ghcr.io/autowarefoundation/autoware-universe:humble-latest-cuda
75
+ needs : build-and-test-differential
102
76
steps :
103
77
- name : Check out repository
104
78
uses : actions/checkout@v3
@@ -129,25 +103,3 @@ jobs:
129
103
target-files : ${{ steps.get-modified-files.outputs.all_changed_files }}
130
104
clang-tidy-config-url : https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy
131
105
build-depends-repos : build_depends.repos
132
-
133
- stop-runner :
134
- name : Stop self-hosted EC2 runner
135
- needs :
136
- - start-runner
137
- - clang-tidy-differential
138
- runs-on : ubuntu-latest
139
- if : ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
140
- steps :
141
- - name : Configure AWS credentials
142
- uses : aws-actions/configure-aws-credentials@v2
143
- with :
144
- aws-access-key-id : ${{ secrets.EC2_ON_DEMAND_AWS_ACCESS_KEY_ID_COMMON }}
145
- aws-secret-access-key : ${{ secrets.EC2_ON_DEMAND_AWS_SECRET_ACCESS_KEY_COMMON }}
146
- aws-region : ${{ secrets.EC2_ON_DEMAND_AWS_REGION_COMMON }}
147
- - name : Stop EC2 runner
148
- uses : machulav/ec2-github-runner@v2
149
- with :
150
- mode : stop
151
- github-token : ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_MFC }}
152
- label : ${{ needs.start-runner.outputs.label }}
153
- ec2-instance-id : ${{ needs.start-runner.outputs.ec2-instance-id }}
0 commit comments