Skip to content

Commit af18341

Browse files
authored
[CI] Several fixes and improvements for AWS CI pipeline (#6575)
* Typo fix in lts_aws_matrix name * Add missing lts_aws_matrix output * Hardened security * Do not report fail is instance was started after on subsequent attempts
1 parent d638420 commit af18341

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ jobs:
216216
# FIXME cached_checkout fails here, but works everywhere else
217217
- uses: actions/checkout@v2
218218
with:
219+
persist-credentials: false
219220
path: llvm
220221
# TODO should this action be packed into container as well?
221222
- uses: ./llvm/devops/actions/llvm_test_suite
@@ -233,7 +234,7 @@ jobs:
233234
aws-stop:
234235
name: Stop AWS
235236
needs: [ aws-start, llvm_test_suite ]
236-
if: ${{ always() && inputs.lts_ats_matrix != '' }}
237+
if: ${{ always() && inputs.lts_aws_matrix != '' }}
237238
runs-on: ubuntu-latest
238239
environment: aws
239240
steps:

.github/workflows/sycl_precommit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
- '**.md'
1818
- '**.rst'
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
lint:
2225
runs-on: ubuntu-latest

.github/workflows/sycl_resolve_test_matrix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838
outputs:
3939
lts_matrix: ${{ steps.work.outputs.lts_matrix }}
40+
lts_aws_matrix: ${{ steps.work.outputs.lts_aws_matrix }}
4041
steps:
4142
- name: Download scripts and configs
4243
shell: bash

devops/actions/aws-ec2/aws-ec2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async function start(param_type, param_label, param_ami, param_spot, param_disk,
4848
// ephemeral runner will exit after one job so we will terminate instance sooner
4949
const ephemeral_str = onejob ? "--ephemeral" : "";
5050

51-
let ec2id; // AWS EC2 instance id
51+
let ec2id; // AWS EC2 instance id
5252
// last error that will be thrown in case all our attemps in instance creation will fails
5353
let last_error;
5454
// loop for spot/ondemand instances
@@ -99,7 +99,7 @@ async function start(param_type, param_label, param_ami, param_spot, param_disk,
9999
// we already created instance and do not need to iterate these loops
100100
if (ec2id) break;
101101
}
102-
if (last_error) {
102+
if (!ec2id && last_error) {
103103
core.error(`Error creating AWS EC2 instance with ${label} label`);
104104
throw last_error;
105105
}

0 commit comments

Comments
 (0)