Skip to content

Commit ab0027f

Browse files
authored
chore(ci): revert "use ec2 for build-and-test-differential (#4413)" (#4477)
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
1 parent 862830d commit ab0027f

File tree

1 file changed

+4
-52
lines changed

1 file changed

+4
-52
lines changed

.github/workflows/build-and-test-differential.yaml

+4-52
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,10 @@ jobs:
1313
with:
1414
label: run-build-and-test-differential
1515

16-
start-runner:
17-
name: Start self-hosted EC2 runner
16+
build-and-test-differential:
1817
needs: prevent-no-label-execution
1918
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]
4620
container: ${{ matrix.container }}${{ matrix.container-suffix }}
4721
strategy:
4822
fail-fast: false
@@ -96,9 +70,9 @@ jobs:
9670
flags: differential
9771

9872
clang-tidy-differential:
99-
needs: build-and-test-differential
100-
runs-on: ${{ needs.start-runner.outputs.label }}
73+
runs-on: [self-hosted, linux, X64]
10174
container: ghcr.io/autowarefoundation/autoware-universe:humble-latest-cuda
75+
needs: build-and-test-differential
10276
steps:
10377
- name: Check out repository
10478
uses: actions/checkout@v3
@@ -129,25 +103,3 @@ jobs:
129103
target-files: ${{ steps.get-modified-files.outputs.all_changed_files }}
130104
clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy
131105
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

Comments
 (0)