Build legate.core #1409
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
name: Build legate.core | |
on: | |
push: | |
branches-ignore: | |
- gh-pages # deployment target branch (this workflow should not exist on that branch anyway) | |
pull_request: | |
branches-ignore: | |
- gh-pages # deployment target branch (this workflow should not exist on that branch anyway) | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 */6 * * *' | |
env: | |
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} | |
PROJECT: github-core-ci | |
REF: ${{ github.event.pull_request.head.ref || github.ref }} | |
EVENT_NAME: ${{ github.event_name }} | |
LABEL: ${{ github.event.pull_request.head.label }} | |
REPO_URL: ${{ github.event.pull_request.head.repo.html_url || github.event.repository.html_url }} | |
# Prevent output buffering | |
PYTHONUNBUFFERED: 1 | |
jobs: | |
build: | |
if: ${{ github.repository == 'nv-legate/legate.core' }} | |
runs-on: self-hosted | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Dump job context | |
env: | |
JOB_CONTEXT: ${{ toJSON(job) }} | |
run: echo "$JOB_CONTEXT" | |
- name: Dump steps context | |
env: | |
STEPS_CONTEXT: ${{ toJSON(steps) }} | |
run: echo "$STEPS_CONTEXT" | |
- name: Dump runner context | |
env: | |
RUNNER_CONTEXT: ${{ toJSON(runner) }} | |
run: echo "$RUNNER_CONTEXT" | |
- name: Dump strategy context | |
env: | |
STRATEGY_CONTEXT: ${{ toJSON(strategy) }} | |
run: echo "$STRATEGY_CONTEXT" | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJSON(matrix) }} | |
run: echo "$MATRIX_CONTEXT" | |
- name: Run CI build | |
run: | | |
/data/github-runner/legate-bin/setup.sh | |
cd legate-ci/github-ci/legate.core | |
rm -rf ngc-artifacts || true | |
./build-conda.sh > ${COMMIT}-build.log 2>&1 | |
- name: Process Output | |
run: | | |
cd legate-ci/github-ci/legate.core | |
cat *artifacts/*/* | |
if: always() | |
- name: Upload Build Log | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-log | |
path: ./**/${{ env.COMMIT }}-build.log.gpg | |
test: | |
if: ${{ github.repository == 'nv-legate/legate.core' }} | |
runs-on: self-hosted | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {name: mypy, options: mypy, log: mypy} | |
- {name: pytest unit tests, options: unit, log: pytest} | |
name: ${{ matrix.name }} | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Dump job context | |
env: | |
JOB_CONTEXT: ${{ toJSON(job) }} | |
run: echo "$JOB_CONTEXT" | |
- name: Dump steps context | |
env: | |
STEPS_CONTEXT: ${{ toJSON(steps) }} | |
run: echo "$STEPS_CONTEXT" | |
- name: Dump runner context | |
env: | |
RUNNER_CONTEXT: ${{ toJSON(runner) }} | |
run: echo "$RUNNER_CONTEXT" | |
- name: Dump strategy context | |
env: | |
STRATEGY_CONTEXT: ${{ toJSON(strategy) }} | |
run: echo "$STRATEGY_CONTEXT" | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJSON(matrix) }} | |
run: echo "$MATRIX_CONTEXT" | |
- name: Prepare | |
run: | | |
/data/github-runner/legate-bin/setup.sh | |
cd legate-ci/github-ci/legate.core | |
if [[ ! -d ngc-artifacts ]] | |
then | |
mkdir ngc-artifacts | |
else | |
rm -rf ngc-artifacts/* | |
fi | |
- name: Test | |
run: | | |
cd legate-ci/github-ci/legate.core | |
./test.sh ${{ matrix.options }} > ${COMMIT}-test-${{ matrix.log }}.log 2>&1 | |
- name: Process output | |
if: always() | |
run: | | |
cd legate-ci/github-ci/legate.core | |
/data/github-runner/legate-bin/encrypt.sh ${COMMIT}-test-${{ matrix.log }}.log | |
cat *artifacts/*/* | |
- name: Upload Log | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-${{ matrix.log }}-log | |
path: ./**/${{ env.COMMIT }}-test-${{ matrix.log }}.log.gpg |