Skip to content

Commit b1c5719

Browse files
[CI] First experiment at switching pre-commit back to pull_request trigger
The idea is to have an auxilliary workflow with `workflow_run` trigger to control self-hosted AWS CUDA runner allocation/destruction. Unfortunately, that trigger is taked from the default branch so I have to make my experiments directly in our origin/sycl branch. This PR provides the sketch for the workflow but doesn't enable the actualy runner allocation (by not using 'aws-type' in the input parameter) so that I can verify things simply by looking into the logs without extra AWS activity.
1 parent f6eeb67 commit b1c5719

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: SYCL Experimental Pre-Commit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- sycl
7+
8+
jobs:
9+
build:
10+
runs-on: [Linux, build]
11+
steps:
12+
- run: echo "Build successful"
13+
14+
e2e:
15+
needs: [build]
16+
runs-on: aws_cuda-${{ github.run_id }}-${{ github.run_attempt }}
17+
steps:
18+
- run: echo "E2E on AWS CUDA successful"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Allocate/Shutdown AWS CUDA Runner
2+
3+
on:
4+
workflow_run:
5+
workflows: [SYCL Experimental Pre-Commit]
6+
types:
7+
- in-progress
8+
- completed
9+
10+
jobs:
11+
start-aws:
12+
runs-on: ubuntu-20.04
13+
environment: aws
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
sparse-checkout: devops/actions/aws-ec2
18+
- run: npm install ./devops/actions/aws-ec2
19+
- id: mode
20+
run: |
21+
if [ "${{ github.event.action }}" == "completed" ]; then
22+
echo 'MODE=stop' >> $GITHUB_OUTPUT
23+
else
24+
echo 'MODE=start' >> $GITHUB_OUTPUT
25+
fi
26+
- uses: ./devops/actions/aws-ec2
27+
with:
28+
mode: ${{ steps.mode.outputs.MODE }}
29+
runs-on-list: '[{"runs-on":"aws_cuda-${{ github.run_id }}-${{ github.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
30+
# runs-on-list: '[{"runs-on":"aws_cuda-${{ github.run_id }}-${{ github.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
31+
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
32+
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
33+
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}

0 commit comments

Comments
 (0)