-
Notifications
You must be signed in to change notification settings - Fork 50
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
Showing
2 changed files
with
61 additions
and
7 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 |
---|---|---|
|
@@ -14,9 +14,20 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
handle-syncwith: | ||
if: github.event_name == 'pull_request' | ||
name: Call Reusable SyncWith Handler | ||
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1 | ||
with: | ||
ci-cd-ref: 'v1' | ||
secrets: inherit | ||
|
||
build-linux: | ||
runs-on: [ self-hosted, Linux, amd64 ] | ||
|
||
needs: | ||
- handle-syncwith | ||
|
||
env: | ||
CONTAINER_TMP: /opt/ | ||
HOST_TMP: /home/runner/work/_temp/ | ||
|
@@ -49,21 +60,37 @@ jobs: | |
cmake --version | ||
- name: Checkout sources | ||
# We need full history, because during CMake config stage we are finding the nearest tag | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 0 | ||
|
||
- name: Clean index.lock files if checkout step was cancelled or failed | ||
if: cancelled() || failure() | ||
run: | | ||
find .git -name 'index.lock' -exec rm -v {} \; | ||
submodules: false | ||
|
||
# Workaround: https://github.com/actions/checkout/issues/1169 | ||
- name: Mark directory as safe | ||
run: | | ||
git config --system --add safe.directory $PWD | ||
- name: Checkout submodules | ||
run: | | ||
git submodule update --init --recursive --depth=1 | ||
- name: Checkout modules to specified refs | ||
if: needs.handle-syncwith.outputs.prs-refs != '' | ||
uses: NilFoundation/ci-cd/actions/recursive-checkout@v1 | ||
# TODO: figure out the mapping of volumes and use variable here, not hardcoded path | ||
with: | ||
paths: | | ||
/__w/zkLLVM/zkLLVM/** | ||
!/__w/zkLLVM/zkLLVM/ | ||
!/__w/zkLLVM/zkLLVM/**/.git/** | ||
refs: ${{ needs.handle-syncwith.outputs.prs-refs }} | ||
|
||
- name: Clean index.lock files if checkout step was cancelled or failed | ||
if: cancelled() || failure() | ||
run: | | ||
find .git -name 'index.lock' -exec rm -v {} \; | ||
- name: Install boost | ||
uses: MarkusJx/[email protected] | ||
id: install-boost | ||
|
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 |
---|---|---|
|
@@ -14,9 +14,21 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
handle-syncwith: | ||
if: github.event_name == 'pull_request' | ||
name: Call Reusable SyncWith Handler | ||
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1 | ||
with: | ||
ci-cd-ref: 'v1' | ||
fetch-only: true | ||
secrets: inherit | ||
|
||
build-macos: | ||
runs-on: [ macos-11 ] | ||
|
||
needs: | ||
- handle-syncwith | ||
|
||
steps: | ||
- name: Install homebrew | ||
run: > | ||
|
@@ -49,10 +61,25 @@ jobs: | |
echo PATH: $PATH | ||
- name: Checkout sources | ||
# We need full history, because during CMake config stage we are finding the nearest tag | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 0 | ||
submodules: false | ||
|
||
- name: Checkout submodules | ||
run: | | ||
git submodule update --init --recursive --depth=1 | ||
- name: Checkout modules to specified refs | ||
if: needs.handle-syncwith.outputs.prs-refs != '' | ||
uses: NilFoundation/ci-cd/actions/recursive-checkout@v1 | ||
with: | ||
paths: | | ||
${{ github.workspace }}/** | ||
!${{ github.workspace }} | ||
!${{ github.workspace }}/**/.git/** | ||
refs: ${{ needs.handle-syncwith.outputs.prs-refs }} | ||
|
||
- name: Enable ccache | ||
uses: hendrikmuhs/[email protected] | ||
|