Skip to content

Commit

Permalink
playing with the flow #2
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocat93 committed Sep 20, 2024
1 parent bbd9646 commit f430b41
Show file tree
Hide file tree
Showing 4 changed files with 397 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
types: [opened, synchronize, reopened, labeled]

jobs:
start-runner:
start-runner-310:
if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'to-test-gpu')
name: start-runner
name: start-runner-310
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
Expand Down Expand Up @@ -36,8 +36,8 @@ jobs:

ubuntu-tests-310:
name: ubuntu-tests-310
needs: start-runner
runs-on: ${{ needs.start-runner.outputs.label }}
needs: start-runner-310
runs-on: ${{ needs.start-runner-310.outputs.label }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -122,13 +122,13 @@ jobs:
--verbose
shell: bash

stop-runner:
name: stop-runner
stop-runner-310:
name: stop-runner-310
needs:
- start-runner # waits for the EC2 instance to be created
- start-runner-310 # waits for the EC2 instance to be created
- ubuntu-tests-310 # waits for the actual job to finish
runs-on: ubuntu-latest
if: ${{ needs.start-runner.outputs.job-ran == 'true' && needs.ubuntu-tests-310.outputs.job-ran == 'true' || failure() }} # required to stop the runner even if an error occurred in previous jobs
if: ${{ needs.start-runner-310.outputs.job-ran == 'true' && needs.ubuntu-tests-310.outputs.job-ran == 'true' || failure() }} # required to stop the runner even if an error occurred in previous jobs
steps:
- name: Check available space
run: |
Expand All @@ -145,5 +145,5 @@ jobs:
with:
mode: stop
github-token: ${{ secrets.GH_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}
label: ${{ needs.start-runner-310.outputs.label }}
ec2-instance-id: ${{ needs.start-runner-310.outputs.ec2-instance-id }}
File renamed without changes.
97 changes: 0 additions & 97 deletions .github/workflows/github-runner-tests.yaml

This file was deleted.

Loading

0 comments on commit f430b41

Please sign in to comment.