Skip to content

Commit

Permalink
SSH into runners
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Aug 30, 2024
1 parent cc68d51 commit 9b518fa
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 24 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ name: CI Linux
on:
workflow_call:
workflow_dispatch:
inputs:
force_debug_with_tmate:
type: boolean
description: 'Run the build with tmate session'
required: false
default: false
debug_with_tmate:
type: boolean
description: 'Run the build with a tmate session ONLY in case of failure'
required: false
default: false
pull_request:
merge_group:
push:
branches:
- main

schedule:
# At minute 0 past every 6th hour. (see https://crontab.guru)
# this job is to keep the ccache cache warm
- cron: '0 */6 * * *'

concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
Expand All @@ -30,7 +36,7 @@ jobs:
env:
CACHE_DIR: ${{ github.workspace }}/.container-cache
# either the PR number or `branch-N` where N always increments
CACHE_KEY: linux-build-test-cpp-asserts-manylinux-v2-${{ github.event.number || format('{0}-{1}', github.ref_name, github.run_number) }}
CACHE_KEY: linux-build-test-cpp-asserts-manylinux-v2-${{ format('{0}-{1}', github.ref_name, github.run_number) }}
steps:
- name: Set unified TZ
uses: szenius/[email protected]
Expand All @@ -51,8 +57,9 @@ jobs:

- name: Install deps
run: |
dnf install -y almalinux-release-devel epel-release
yum remove -y openssl-devel zlib-devel || true
yum install -y protobuf-devel protobuf-compiler
yum install -y protobuf-devel protobuf-compiler tmate
- name: Sync source deps
run: |
Expand Down Expand Up @@ -90,11 +97,18 @@ jobs:

- name: Save cache
uses: actions/cache/save@v3
if: ${{ !cancelled() && github.event_name != 'pull_request' }}
if: ${{ !cancelled() && github.event_name == 'push' && github.ref_name == 'main' }}
with:
path: ${{ env.CACHE_DIR }}
key: ${{ env.CACHE_KEY }}

- name: Start tmate session
if: ${{ (failure() && inputs.debug_with_tmate) || inputs.force_debug_with_tmate }}
uses: mxschmitt/[email protected]
with:
limit-access-to-actor: true
install-dependencies: false

test_linux:
name: E2E Test linux
needs: build_and_ctest
Expand All @@ -118,8 +132,7 @@ jobs:

- name: Extract artifact
run: |
mkdir iree-install
tar -xf iree-dist-linux.tar -C iree-install
tar -xf iree-dist-linux.tar
bash build_tools/download_peano.sh
- name: Create venv and install dependencies
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ name: CI MacOS
on:
workflow_call:
workflow_dispatch:
inputs:
force_debug_with_tmate:
type: boolean
description: 'Run the build with tmate session'
required: false
default: false
debug_with_tmate:
type: boolean
description: 'Run the build with a tmate session ONLY in case of failure'
required: false
default: false
pull_request:
merge_group:
push:
branches:
- main

schedule:
- cron: '0 */6 * * *'

concurrency:
group: ci-build-test-cpp-macos-${{ github.event.number || github.sha }}
cancel-in-progress: true
Expand All @@ -26,7 +34,7 @@ jobs:
runs-on: [macos-12, macos-14]
env:
CACHE_DIR: ${{ github.workspace }}/.container-cache
CACHE_KEY: ${{ matrix.runs-on }}-build-test-cpp-asserts-v1-${{ github.event.number || format('{0}-{1}', github.ref_name, github.run_number) }}
CACHE_KEY: ${{ matrix.runs-on }}-build-test-cpp-asserts-v1-${{ format('{0}-{1}', github.ref_name, github.run_number) }}
steps:
- name: Set unified TZ
uses: szenius/[email protected]
Expand Down Expand Up @@ -73,7 +81,7 @@ jobs:
- name: Create artifacts
if: ${{ !cancelled() }}
run: |
tar cf iree-dist-${{ matrix.runs-on }}.tar -C iree-install .
tar cf iree-dist-${{ matrix.runs-on }}.tar iree-install
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -85,7 +93,13 @@ jobs:

- name: Save cache
uses: actions/cache/save@v3
if: ${{ !cancelled() && github.event_name != 'pull_request' }}
if: ${{ !cancelled() && github.event_name == 'push' && github.ref_name == 'main' }}
with:
path: ${{ env.CACHE_DIR }}
key: ${{ env.CACHE_KEY }}

- name: Start tmate session
if: ${{ (failure() && inputs.debug_with_tmate) || inputs.force_debug_with_tmate }}
uses: mxschmitt/[email protected]
with:
limit-access-to-actor: true
29 changes: 21 additions & 8 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ name: CI Windows
on:
workflow_call:
workflow_dispatch:
inputs:
force_debug_with_tmate:
type: boolean
description: 'Run the build with tmate session'
required: false
default: false
debug_with_tmate:
type: boolean
description: 'Run the build with a tmate session ONLY in case of failure'
required: false
default: false
pull_request:
merge_group:
push:
branches:
- main

schedule:
- cron: '0 */6 * * *'

concurrency:
group: ci-build-test-cpp-windows-${{ github.event.number || github.sha }}
cancel-in-progress: true
Expand All @@ -29,7 +37,7 @@ jobs:
fail-fast: true
env:
CACHE_DIR: ${{ github.workspace }}/.container-cache
CACHE_KEY: windows-build-test-cpp-asserts-v1-${{ github.event.number || format('{0}-{1}', github.ref_name, github.run_number) }}
CACHE_KEY: windows-build-test-cpp-asserts-v1-${{ format('{0}-{1}', github.ref_name, github.run_number) }}
steps:
- name: Set unified TZ
uses: szenius/[email protected]
Expand Down Expand Up @@ -81,7 +89,7 @@ jobs:
- name: Create artifacts
if: ${{ !cancelled() }}
run: |
tar cf iree-dist-windows.tar -C iree-install .
tar cf iree-dist-windows.tar iree-install
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -93,11 +101,17 @@ jobs:

- name: Save cache
uses: actions/cache/save@v3
if: ${{ !cancelled() && github.event_name != 'pull_request' }}
if: ${{ !cancelled() && github.event_name == 'push' && github.ref_name == 'main' }}
with:
path: ${{ env.CACHE_DIR }}
key: ${{ env.CACHE_KEY }}

- name: Start tmate session
if: ${{ (failure() && inputs.debug_with_tmate) || inputs.force_debug_with_tmate }}
uses: mxschmitt/[email protected]
with:
limit-access-to-actor: true

test_windows:
name: E2E Test windows
runs-on: windows-phoenix
Expand All @@ -117,8 +131,7 @@ jobs:

- name: Extract artifact
run: |
mkdir iree-install
tar -xf iree-dist-windows.tar -C iree-install
tar -xf iree-dist-windows.tar
bash build_tools/download_peano.sh
- name: Create venv and install dependencies
Expand Down

0 comments on commit 9b518fa

Please sign in to comment.