-
Notifications
You must be signed in to change notification settings - Fork 29
125 lines (106 loc) · 4.15 KB
/
Copy pathrelease.yml
File metadata and controls
125 lines (106 loc) · 4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Create GitHub release
on:
workflow_dispatch:
inputs:
rapids-version:
type: string
default: "26.4.0"
description: "RAPIDS version"
make-release:
type: boolean
default: false
description: "Make Release"
draft-release:
type: boolean
default: false
description: "Draft Release"
npm-publish:
type: boolean
default: false
description: "Publish to NPM"
env:
RAPIDS: "${{ inputs.rapids-version }}"
concurrency:
group: release-${{ inputs.rapids-version }}
cancel-in-progress: true
permissions: {}
jobs:
extract-and-publish-packages:
name: Extract libs and publish release
runs-on: ${{ fromJSON(github.repository != 'rapidsai/node' && '"ubuntu-latest"' || format('"linux-{0}-cpu16"', matrix.ARCH)) }}
strategy:
fail-fast: true
matrix:
CUDA: ["12.9.1", "13.1.1"]
ARCH: ["amd64", "arm64"]
NODE: ["24.14.1"]
LINUX: ["ubuntu24.04"]
permissions:
contents: write
steps:
- name: Extract node native addons
shell: bash --noprofile --norc -eo pipefail {0}
run: |
set -x;
mkdir -p build;
ARCH="${{ matrix.ARCH }}";
NODE="node${{ matrix.NODE }}";
CUDA="cuda$(echo "${{ matrix.CUDA }}" | cut -d'.' -f1)";
LINUX="$(echo "${{ matrix.LINUX }}" | tr '[:upper:]' '[:lower:]')";
docker run --rm --pull always --platform "linux/${ARCH}" -v "$PWD/build:/out" \
ghcr.io/${{ github.repository }}:${RAPIDS}-devel-${NODE}-${CUDA}-${LINUX}-packages \
sh -c "find /opt/rapids/ -type f -name 'rapidsai_*-*-*.tar.gz' -exec cp {} /out/ \;"
for x in cuda rmm cudf cuml cugraph cuspatial io; do
tar -zf build/rapidsai_${x}-*.tar.gz \
--wildcards --strip-components=1 \
-C build -x "*/rapidsai_${x}*.node" \
--transform="s/rapidsai_${x}.node/rapidsai_${x}-${RAPIDS}-${CUDA}-${LINUX}-${ARCH}.node/" \
--transform="s/rapidsai_${x}_(.*)/rapidsai_${x}-${RAPIDS}-${CUDA}-${LINUX}-${ARCH}-sm\1/" ;
done;
rm -rf build/*.tar.gz;
- name: Upload node native addons
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ inputs.make-release != true }}
with:
path: build/*.node
name: rapidsai-native-addons
- name: Create GitHub release
if: ${{ inputs.make-release == true }}
env:
GH_TOKEN: ${{ github.token }}
DRAFT_RELEASE: ${{ inputs.draft-release }}
RAPIDS_VERSION: ${{ env.RAPIDS }}
run: |
EXTRA_RELEASE_ARGS=()
if [[ "${DRAFT_RELEASE}" == "true" ]]; then
EXTRA_RELEASE_ARGS+=("--draft")
fi
gh release create v$RAPIDS_VERSION build/*.node "${EXTRA_RELEASE_ARGS[@]}"
publish-npm-packages:
if: ${{ inputs.make-release == true && inputs.npm-publish == true }}
name: Publish npm packages
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
CUDA: ["13.1.1"]
ARCH: ["amd64"]
NODE: ["24.14.1"]
LINUX: ["ubuntu24.04"]
steps:
- name: Publish npm packages
shell: bash --noprofile --norc -eo pipefail {0}
env:
NPM_TOKEN: "${{ secrets.RAPIDSAI_OWNER_NPM_AUTOMATION_TOKEN }}"
run: |
set -x;
mkdir -p build;
ARCH="${{ matrix.ARCH }}";
NODE="node${{ matrix.NODE }}";
CUDA="cuda$(echo "${{ matrix.CUDA }}" | cut -d'.' -f1)";
LINUX="$(echo "${{ matrix.LINUX }}" | tr '[:upper:]' '[:lower:]')";
docker run --rm --pull always --platform "linux/${ARCH}" -v "$PWD/build:/out" \
ghcr.io/${{ github.repository }}:${RAPIDS}-devel-${NODE}-${CUDA}-${LINUX}-packages \
sh -c "find /opt/rapids/ -type f \( -name 'rapidsai-deck.gl*.tgz' -or -name 'rapidsai-[^demo]*.tgz' \) -exec cp {} /out/ \;"
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > "$HOME/.npmrc"
find build -type f -name 'rapidsai-*.tgz' -exec npm publish --access public ./{} \;