|
1 | | -name: Linux CI on AWS (AMD64) |
| 1 | +name: Linux CI |
2 | 2 |
|
3 | 3 | env: |
4 | 4 | # "Source" is set in the vcpkg install step |
|
15 | 15 | - 'docker/**' |
16 | 16 | - '.github/**' |
17 | 17 | - '**.md' |
18 | | - - '!.github/workflows/vcpkg_ci_aws_amd64*' |
| 18 | + - '!.github/workflows/vcpkg_ci_amd64*' |
19 | 19 | push: |
20 | 20 | paths-ignore: |
21 | 21 | - 'docker/**' |
22 | 22 | - '.github/**' |
23 | 23 | - '**.md' |
24 | | - - '!.github/workflows/vcpkg_ci_aws_amd64*' |
| 24 | + - '!.github/workflows/vcpkg_ci_amd64*' |
25 | 25 | tags-ignore: |
26 | 26 | - 'v*' |
27 | 27 | branches: |
28 | 28 | - 'master' |
29 | 29 |
|
30 | 30 | jobs: |
31 | | - start-runner: |
32 | | - name: Start self-hosted EC2 runner |
33 | | - runs-on: ubuntu-latest |
34 | | - strategy: |
35 | | - matrix: |
36 | | - ec2: |
37 | | - - { ami: ami-0610b26d76319237e, instance-type: m6i.8xlarge} |
38 | | - outputs: |
39 | | - label: ${{ steps.start-ec2-runner.outputs.label }} |
40 | | - ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} |
41 | | - steps: |
42 | | - - name: Configure AWS credentials |
43 | | - uses: aws-actions/configure-aws-credentials@v1 |
44 | | - with: |
45 | | - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
46 | | - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
47 | | - aws-region: ${{ secrets.AWS_REGION }} |
48 | | - - name: Start EC2 runner |
49 | | - id: start-ec2-runner |
50 | | - uses: machulav/ec2-github-runner@v2 |
51 | | - with: |
52 | | - mode: start |
53 | | - github-token: ${{ secrets.GHA_PAT }} |
54 | | - ec2-image-id: ${{ matrix.ec2.ami }} |
55 | | - ec2-instance-type: ${{ matrix.ec2.instance-type }} |
56 | | - subnet-id: subnet-0deb935f0bbfe1a5d |
57 | | - security-group-id: sg-0f6a02eb80fafb982 |
58 | | - aws-resource-tags: > # optional, requires additional permissions |
59 | | - [ |
60 | | - {"Key": "Name", "Value": "ec2-github-runner"}, |
61 | | - {"Key": "GitHubRepository", "Value": "${{ github.repository }}"} |
62 | | - ] |
63 | | - do-the-job: |
| 31 | + build: |
64 | 32 | strategy: |
65 | 33 | fail-fast: false |
66 | 34 | matrix: |
|
81 | 49 | VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.host.triplet }} |
82 | 50 |
|
83 | 51 | name: Do the job on the runner |
84 | | - needs: start-runner # required to start the main job when the runner is ready |
85 | | - runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner |
| 52 | + runs-on: ubuntu-latest # run the job on the newly created runner |
86 | 53 | steps: |
87 | 54 | - uses: actions/checkout@v3 |
88 | 55 | with: |
@@ -229,25 +196,3 @@ jobs: |
229 | 196 | run: | |
230 | 197 | rm -rf vcpkg/{buildtrees,installed,packages} |
231 | 198 | ccache --show-stats |
232 | | -
|
233 | | - stop-runner: |
234 | | - name: Stop self-hosted EC2 runner |
235 | | - needs: |
236 | | - - start-runner # required to get output from the start-runner job |
237 | | - - do-the-job # required to wait when the main job is done |
238 | | - runs-on: ubuntu-latest |
239 | | - if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs |
240 | | - steps: |
241 | | - - name: Configure AWS credentials |
242 | | - uses: aws-actions/configure-aws-credentials@v1 |
243 | | - with: |
244 | | - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
245 | | - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
246 | | - aws-region: ${{ secrets.AWS_REGION }} |
247 | | - - name: Stop EC2 runner |
248 | | - uses: machulav/ec2-github-runner@v2 |
249 | | - with: |
250 | | - mode: stop |
251 | | - github-token: ${{ secrets.GHA_PAT }} |
252 | | - label: ${{ needs.start-runner.outputs.label }} |
253 | | - ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} |
0 commit comments