|
1 | | -name: Build cunumeric on GH |
| 1 | +name: Build and test cunumeric on GH |
2 | 2 |
|
3 | 3 | concurrency: |
4 | | - group: ci-gpu-on-${{ github.event_name }}-from-${{ github.ref_name }} |
| 4 | + group: ci-build-and-test-on-${{ github.event_name }}-from-${{ github.ref_name }} |
5 | 5 | cancel-in-progress: true |
6 | 6 |
|
7 | 7 | on: |
|
11 | 11 | - "branch-*" |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - build: |
15 | | - permissions: |
16 | | - id-token: write # This is required for configure-aws-credentials |
17 | | - contents: read # This is required for actions/checkout |
18 | | - |
19 | | - # Ref: https://docs.rapids.ai/resources/github-actions/#cpu-labels for `linux-amd64-cpu4` |
20 | | - runs-on: ${{ github.repository == 'nv-legate/cunumeric' && 'linux-amd64-cpu4' || 'ubuntu-latest' }} |
21 | | - container: |
22 | | - options: -u root |
23 | | - image: rapidsai/devcontainers:23.06-cpp-cuda11.8-mambaforge-ubuntu22.04 |
24 | | - volumes: |
25 | | - - ${{ github.workspace }}/out:/tmp/out |
26 | | - env: |
27 | | - DEFAULT_CONDA_ENV: legate |
28 | | - PYTHONDONTWRITEBYTECODE: 1 |
29 | | - SCCACHE_REGION: us-east-2 |
30 | | - SCCACHE_BUCKET: rapids-sccache-east |
31 | | - SCCACHE_S3_KEY_PREFIX: legate-cunumeric-dev |
32 | | - GH_TOKEN: "${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}" |
33 | | - GITHUB_TOKEN: "${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}" |
34 | | - VAULT_HOST: "${{ secrets.PERSONAL_ACCESS_TOKEN && 'https://vault.ops.k8s.rapids.ai' || '' }}" |
35 | | - VAULT_S3_TTL: "28800s" # 8 hours |
36 | | - |
37 | | - steps: |
38 | | - - name: Checkout legate.core |
39 | | - uses: actions/checkout@v3 |
40 | | - with: |
41 | | - repository: nv-legate/legate.core |
42 | | - fetch-depth: 0 |
43 | | - path: legate |
44 | | - |
45 | | - - name: Checkout cunumeric (= this repo) |
46 | | - uses: actions/checkout@v3 |
47 | | - with: |
48 | | - fetch-depth: 0 |
49 | | - path: cunumeric |
50 | | - |
51 | | - - name: Setup |
52 | | - shell: bash -eo pipefail {0} |
53 | | - run: | |
54 | | - export LEGATE_SHA=$(cat cunumeric/cmake/versions.json | jq -r '.packages.legate_core.git_tag') |
55 | | - echo "Checking out LEGATE_SHA: ${LEGATE_SHA}" |
56 | | - git -C legate checkout $LEGATE_SHA |
57 | | - |
58 | | - cp -ar legate/continuous_integration/home/coder/.gitconfig /home/coder/; |
59 | | - cp -ar legate/continuous_integration/home/coder/.local /home/coder/; |
60 | | - mv legate /home/coder/legate |
61 | | -
|
62 | | - cp -ar cunumeric/continuous_integration/home/coder/.local/bin/* /home/coder/.local/bin/; |
63 | | - mv cunumeric /home/coder/cunumeric; |
64 | | -
|
65 | | - chmod a+x /home/coder/.local/bin/*; |
66 | | - chown -R coder:coder /home/coder/; |
67 | | - chown -R coder:coder /tmp/out; |
68 | | -
|
69 | | - - if: github.repository == 'nv-legate/cunumeric' |
70 | | - name: Get AWS credentials for sccache bucket |
71 | | - uses: aws-actions/configure-aws-credentials@v2 |
72 | | - with: |
73 | | - aws-region: us-east-2 |
74 | | - role-duration-seconds: 28800 # 8 hours |
75 | | - role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-nv-legate |
76 | | - |
77 | | - - name: Create conda env |
78 | | - shell: su coder {0} |
79 | | - run: cd ~/; exec entrypoint get-yaml-and-make-conda-env; |
80 | | - |
81 | | - - name: Build legate.core C++ library |
82 | | - shell: su coder {0} |
83 | | - run: cd ~/; exec entrypoint build-legate-cpp; |
84 | | - |
85 | | - - name: Build legate.core Python Wheel |
86 | | - shell: su coder {0} |
87 | | - run: cd ~/; exec entrypoint build-legate-wheel; |
88 | | - |
89 | | - - name: Build legate.core Conda Package |
90 | | - shell: su coder {0} |
91 | | - run: cd ~/; exec entrypoint build-legate-conda; |
92 | | - |
93 | | - - name: Build cunumeric C++ library |
94 | | - shell: su coder {0} |
95 | | - run: cd ~/; exec entrypoint build-cunumeric-cpp; |
96 | | - |
97 | | - - name: Build cunumeric Python Wheel |
98 | | - shell: su coder {0} |
99 | | - run: cd ~/; exec entrypoint build-cunumeric-wheel; |
100 | | - |
101 | | - - name: Build cunumeric Conda Package |
102 | | - shell: su coder {0} |
103 | | - run: cd ~/; exec entrypoint build-cunumeric-conda; |
104 | | - |
105 | | - - name: Upload build output |
106 | | - uses: actions/upload-artifact@v3 |
107 | | - with: |
108 | | - name: "cunumeric-${{ github.sha }}" |
109 | | - path: ./out/* |
| 14 | + build-and-test: |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - {build-target: cpu} |
| 20 | + - {build-target: gpu} |
| 21 | + uses: |
| 22 | + ./.github/workflows/gh-build-and-test.yml |
| 23 | + with: |
| 24 | + build-target: ${{ matrix.build-target }} |
| 25 | + sha: ${{ github.sha }} |
0 commit comments