Skip to content

Commit 68d1e61

Browse files
committed
First commit.
1 parent b9f40f6 commit 68d1e61

File tree

5 files changed

+140
-0
lines changed

5 files changed

+140
-0
lines changed

.github/workflows/ci-gh.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and test conda release package
2+
3+
concurrency:
4+
group: ${{ startsWith(github.ref_name, 'main') && format('unique-{0}', github.run_id) || format('ci-build-and-test-on-{0}-from-{1}', github.event_name, github.ref_name) }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- "pull-request/[0-9]+"
11+
- "main"
12+
13+
jobs:
14+
build-and-test:
15+
name: Build and test (${{ matrix.platform }}, ${{ matrix.target-device }}, ${{ matrix.build-mode }})
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
platform:
20+
- linux
21+
target-device:
22+
- gpu
23+
build-mode:
24+
- release
25+
upload-enabled:
26+
- false
27+
uses:
28+
./.github/workflows/gh-build-and-test.yml
29+
with:
30+
platform: ${{ matrix.platform }}
31+
target-device: ${{ matrix.target-device }}
32+
build-mode: ${{ matrix.build-mode }}
33+
build-type: release
34+
upload-enabled: ${{ matrix.upload-enabled }}
35+
secrets: inherit
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
platform:
5+
type: string
6+
required: true
7+
target-device:
8+
type: string
9+
required: true
10+
build-mode:
11+
type: string
12+
required: true
13+
build-type:
14+
type: string
15+
required: true
16+
upload-enabled:
17+
type: boolean
18+
required: true
19+
jobs:
20+
build:
21+
if: ${{ github.repository_owner == 'nvidia' }}
22+
uses:
23+
nv-legate/legate-gh-ci/.github/workflows/[email protected]
24+
with:
25+
client-repo: ${{ github.event.repository.name }}
26+
target-device: ${{ inputs.target-device }}
27+
runs-on: ${{ (inputs.platform == 'linux' && 'linux-amd64-cpu16') || (inputs.platform == 'linux-aarch64' && 'linux-arm64-cpu16') || (inputs.platform == 'mac' && 'macos-latest') }}
28+
build-type: ${{ inputs.build-type }}
29+
use-container: ${{ inputs.platform == 'linux' || inputs.platform == 'linux-aarch64'}}
30+
platform: ${{ inputs.platform }}
31+
dependencies-file: ""
32+
legate-gh-ci-tag: "v1.10"
33+
build-mode: ${{ inputs.build-mode }}
34+
upload-enabled: ${{ inputs.upload-enabled }}
35+
secrets: inherit
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: cupy
2+
channels:
3+
- defaults
4+
dependencies:
5+
- python=3.11
6+
- cython>=3.0.0
7+
- pytest>=6.2.4
8+
- numpy>=1.21.1
9+
- setuptools
10+
- wheel
11+
- pip
12+
- cuda-version >= 12.6
13+
- cuda-cudart-static
14+
- cuda-driver-dev
15+
- cuda-cudart-dev
16+
- cuda-profiler-api
17+
- cuda-nvrtc-dev
18+
- cuda-nvcc
19+
- pip:
20+
- pytest-benchmark>=3.4.1
21+
- pyclibrary>=0.1.7
22+
- versioneer==0.29
23+
- tomli; python_version < "3.11"
24+
- pywin32; sys_platform == 'win32'

continuous_integration/scripts/build

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
build_ci() {
4+
set -xeou pipefail
5+
6+
cd "${REPO_DIR}"
7+
8+
python setup.py build_ext --inplace
9+
}
10+
11+
build_project() {
12+
set -xeou pipefail
13+
14+
export PYTHONUNBUFFERED=1
15+
16+
git config --global --add safe.directory "$REPO_DIR/.git"
17+
18+
case "${BUILD_TYPE}" in
19+
ci) build_ci;;
20+
*) return 1;;
21+
esac
22+
}
23+
24+
(build_project "$@");
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
make_ci_env() {
6+
mamba create -y -n "${CONDA_ENV}" -f "${REPO_DIR}/continuous_integration/environment.yml"
7+
}
8+
9+
make_conda_env() {
10+
set -xeuo pipefail
11+
12+
export CONDA_ENV=cupy
13+
14+
case "$1" in
15+
ci) make_ci_env;;
16+
*) return 1;;
17+
esac
18+
19+
return 0;
20+
}
21+
22+
(make_conda_env "$@");

0 commit comments

Comments
 (0)