Skip to content

Commit

Permalink
[CI] use self-hostd longrun runner (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
xsuler authored Mar 4, 2025
1 parent 91690dd commit 86e20b3
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/ray-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
jobs:
start-ecs-runner:
name: Start ECS Runner
runs-on: ubuntu-latest
runs-on: longrun # this is only used to trigger ecs runner
environment: aliyun
concurrency:
group: ${{ github.workflow }}
Expand All @@ -27,18 +27,10 @@ jobs:
leased_instance_id: ${{ steps.lease_instance.outputs.instance_id }}
leased_disk_id: ${{ steps.lease_instance.outputs.disk_id }}
steps:
- name: Configure Aliyun CLI
run: |
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar -xvf aliyun-cli-linux-latest-amd64.tgz
./aliyun configure set --profile default \
--access-key-id ${{ secrets.ALIYUN_ACCESS_KEY }} \
--access-key-secret ${{ secrets.ALIYUN_ACCESS_SECRET }} \
--region us-west-1
- name: Lease and Start Instance
id: lease_instance
run: |
cd ~/actions-runner
# Parse instance:disk pairs
IFS=',' read -ra INSTANCE_PAIRS <<< "${{ secrets.ALIYUN_ECS_INSTANCE_IDS }}"
Expand Down Expand Up @@ -548,17 +540,11 @@ jobs:
- build-base-images
- core-tests
if: always()
runs-on: ubuntu-latest
runs-on: longrun
steps:
- name: Configure Aliyun CLI
run: |
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar -xvf aliyun-cli-linux-latest-amd64.tgz
./aliyun configure set --profile default \
--access-key-id ${{ secrets.ALIYUN_ACCESS_KEY }} \
--access-key-secret ${{ secrets.ALIYUN_ACCESS_SECRET }} \
--region us-west-1
# Add retry logic for StopInstance
cd ~/actions-runner
max_attempts=3
for i in $(seq 1 $max_attempts); do
if ./aliyun ecs StopInstance --InstanceId ${{ needs.start-ecs-runner.outputs.leased_instance_id }} --ForceStop true --region us-west-1; then
Expand Down

0 comments on commit 86e20b3

Please sign in to comment.