Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Start/Stop AWS instance

on:
workflow_call:
inputs:
mode:
description: "Mode of operation: start or stop"
type: string
required: true

runs-on-list:
# See devops/actions/aws-ec2/action.yml for more details.
description: "JSON string with array of objects with aws-type, runs-on, aws-ami, aws-spot, aws-disk, aws-timebomb, one-job properties"
type: string
required: true

jobs:
aws:
runs-on: cuda
environment: aws
steps:
- name: Register cleanup after job is finished
uses: ./actions/cleanup
- name: Setup script
run: |
mkdir -p ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/action.yml -P ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/aws-ec2.js -P ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/package.json -P ./aws-ec2
npm install ./aws-ec2
- name: Start AWS EC2 runners
uses: ./aws-ec2
with:
mode: ${{ inputs.mode }}
runs-on-list: ${{ inputs.runs-on-list }}
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
45 changes: 10 additions & 35 deletions .github/workflows/sycl_linux_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,23 +206,11 @@ jobs:
name: Start AWS
needs: build
if: ${{ inputs.lts_aws_matrix != '[]' }}
runs-on: ubuntu-20.04
environment: aws
steps:
- name: Setup script
run: |
mkdir -p ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/action.yml -P ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/aws-ec2.js -P ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/package.json -P ./aws-ec2
npm install ./aws-ec2
- name: Start AWS EC2 runners
uses: ./aws-ec2
with:
runs-on-list: ${{ inputs.lts_aws_matrix }}
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
uses: ./.github/workflows/aws.yml
secrets: inherit
with:
mode: start
runs-on-list: ${{ inputs.lts_aws_matrix }}

e2e-tests:
needs: [build, aws-start]
Expand Down Expand Up @@ -324,21 +312,8 @@ jobs:
# Always attempt to shutdown AWS instance, even if AWS start was not
# successful.
if: ${{ always() && inputs.lts_aws_matrix != '[]' }}
runs-on: ubuntu-20.04
environment: aws
steps:
- name: Setup script
run: |
mkdir -p ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/action.yml -P ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/aws-ec2.js -P ./aws-ec2
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/package.json -P ./aws-ec2
npm install ./aws-ec2
- name: Stop AWS EC2 runners
uses: ./aws-ec2
with:
runs-on-list: ${{ inputs.lts_aws_matrix }}
mode: stop
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
uses: ./.github/workflows/aws.yml
secrets: inherit
with:
mode: stop
runs-on-list: ${{ inputs.lts_aws_matrix }}