-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5fbf9d
commit 3bc12eb
Showing
3 changed files
with
68 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,24 @@ on: | |
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 | ||
# (postsubmit). | ||
group: ci-build-test-cpp-linux-${{ github.event.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
# required to delete cache | ||
# https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-github-actions-caches-for-a-repository-using-a-cache-key | ||
actions: write | ||
|
||
jobs: | ||
build_and_ctest: | ||
name: Build and Test (linux, ASSERTIONS) | ||
|
@@ -24,6 +35,7 @@ jobs: | |
fail-fast: true | ||
env: | ||
CACHE_DIR: ${{ github.workspace }}/.container-cache | ||
CACHE_KEY: linux-build-test-cpp-asserts-manylinux-v2-${{ github.event.number || github.ref_name }} | ||
steps: | ||
- name: Set unified TZ | ||
uses: szenius/[email protected] | ||
|
@@ -42,11 +54,16 @@ jobs: | |
with: | ||
submodules: recursive | ||
|
||
- name: Install static libs | ||
- name: Install deps | ||
run: | | ||
dnf install -y almalinux-release-devel | ||
yum remove -y openssl-devel zlib-devel || true | ||
yum install -y protobuf-devel protobuf-compiler | ||
dnf install -y almalinux-release-devel | ||
type -p yum-config-manager >/dev/null || yum -y install yum-utils | ||
yum-config-manager -y --add-repo https://cli.github.com/packages/rpm/gh-cli.repo | ||
yum install -y protobuf-devel protobuf-compiler gh | ||
- name: Sync source deps | ||
run: | | ||
python ./sync_deps.py | ||
|
@@ -59,7 +76,7 @@ jobs: | |
uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ env.CACHE_DIR }} | ||
key: linux-build-test-cpp-asserts-manylinux-v2-${{ github.sha }} | ||
key: ${{ env.CACHE_KEY }} | ||
restore-keys: linux-build-test-cpp- | ||
|
||
- name: Build packages | ||
|
@@ -82,12 +99,22 @@ jobs: | |
path: iree-dist-linux.tar | ||
if-no-files-found: warn | ||
|
||
- name: Overwrite cache | ||
if: ${{ !cancelled() }} | ||
continue-on-error: true | ||
env: | ||
# required to run gh with privileges | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
gh actions-cache delete ${{ env.CACHE_KEY }} --confirm -R ${{ github.repository }} | ||
- name: Save cache | ||
uses: actions/cache/save@v3 | ||
if: ${{ !cancelled() }} | ||
with: | ||
path: ${{ env.CACHE_DIR }} | ||
key: linux-build-test-cpp-asserts-manylinux-v2-${{ github.sha }} | ||
key: ${{ env.CACHE_KEY }} | ||
|
||
test_linux: | ||
name: E2E Test linux | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,17 @@ on: | |
branches: | ||
- main | ||
|
||
schedule: | ||
- 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 | ||
# (postsubmit). | ||
group: ci-build-test-cpp-macos-${{ github.event.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
actions: write | ||
|
||
jobs: | ||
build_and_ctest: | ||
name: Build and Test (${{ matrix.runs-on }}, ASSERTIONS) | ||
|
@@ -26,6 +30,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 || github.ref_name }} | ||
steps: | ||
- name: Set unified TZ | ||
uses: szenius/[email protected] | ||
|
@@ -60,9 +65,7 @@ jobs: | |
uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ env.CACHE_DIR }} | ||
# without datetime stamps you'll get collisions for the cache warming runs | ||
# ("Failed to save: Unable to reserve cache with key ..., another job may be creating this cache.") | ||
key: ${{ matrix.runs-on }}-build-test-cpp-asserts-v1-${{ github.sha }}-${{ github.event.repository.updated_at }} | ||
key: ${{ env.CACHE_KEY }} | ||
restore-keys: ${{ matrix.runs-on }}-build-test-cpp- | ||
|
||
- name: Build packages | ||
|
@@ -85,9 +88,18 @@ jobs: | |
path: iree-dist-${{ matrix.runs-on }}.tar | ||
if-no-files-found: warn | ||
|
||
- name: Overwrite cache | ||
if: ${{ !cancelled() }} | ||
continue-on-error: true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
gh actions-cache delete ${{ env.CACHE_KEY }} --confirm -R ${{ github.repository }} | ||
- name: Save cache | ||
uses: actions/cache/save@v3 | ||
if: ${{ !cancelled() }} | ||
with: | ||
path: ${{ env.CACHE_DIR }} | ||
key: ${{ matrix.runs-on }}-build-test-cpp-asserts-v1-${{ github.sha }}-${{ github.event.repository.updated_at }} | ||
key: ${{ env.CACHE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,9 @@ on: | |
- main | ||
|
||
schedule: | ||
# At minute 0 past every 12th hour. (see https://crontab.guru) | ||
# this job is to keep the ccache cache warm | ||
- cron: '0 */12 * * *' | ||
- 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 | ||
# (postsubmit). | ||
group: ci-build-test-cpp-windows-${{ github.event.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
|
@@ -26,6 +21,10 @@ defaults: | |
# force bash for windows | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
actions: write | ||
|
||
jobs: | ||
build_and_ctest: | ||
name: Build and Test (windows, ASSERTIONS) | ||
|
@@ -34,6 +33,7 @@ jobs: | |
fail-fast: true | ||
env: | ||
CACHE_DIR: ${{ github.workspace }}/.container-cache | ||
CACHE_KEY: windows-build-test-cpp-asserts-v1-${{ github.event.number || github.ref_name }} | ||
steps: | ||
- name: Set unified TZ | ||
uses: szenius/[email protected] | ||
|
@@ -73,9 +73,7 @@ jobs: | |
uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ env.CACHE_DIR }} | ||
# without datetime stamps you'll get collisions for the cache warming runs | ||
# ("Failed to save: Unable to reserve cache with key ..., another job may be creating this cache.") | ||
key: windows-build-test-cpp-asserts-v1-${{ github.sha }}-${{ github.event.repository.updated_at }} | ||
key: ${{ env.CACHE_KEY }} | ||
restore-keys: windows-build-test-cpp- | ||
|
||
- name: Build packages | ||
|
@@ -98,9 +96,18 @@ jobs: | |
path: iree-dist-windows.tar | ||
if-no-files-found: warn | ||
|
||
- name: Overwrite cache | ||
if: ${{ !cancelled() }} | ||
continue-on-error: true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
gh actions-cache delete ${{ env.CACHE_KEY }} --confirm -R ${{ github.repository }} | ||
- name: Save cache | ||
uses: actions/cache/save@v3 | ||
if: ${{ !cancelled() }} | ||
with: | ||
path: ${{ env.CACHE_DIR }} | ||
key: windows-build-test-cpp-asserts-v1-${{ github.sha }}-${{ github.event.repository.updated_at }} | ||
key: ${{ env.CACHE_KEY }} |