Skip to content

Commit

Permalink
Add workflow to build and publish windows images separate from the li…
Browse files Browse the repository at this point in the history
…nux images (#288)

* add workflow to build and publish windows images separate from the linux images

* update image-matrix changed files list

* fix version match in ci/release/update-versions.sh

* don't build linux images if windows action changes

* add ucxx to raft-dask dependencies

* Fix rustup-init sha256sum check (devcontainers/features#962)
  • Loading branch information
trxcllnt authored May 7, 2024
1 parent 9c11dea commit cb6f93e
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 40 deletions.
29 changes: 14 additions & 15 deletions .github/actions/image-matrix/action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,21 @@ features="$(echo \
|| echo '' \
)";

if `# Include all images if full_matrix is true` \
[ "${full_matrix}" == "1" ] \
`# Include all images if matrix or workflows changed` \
|| grep -q 'matrix\.yml' <<< "${files}" \
|| grep -q '\.github/workflows/test\.yml' <<< "${files}" \
|| grep -q '\.github/actions/build-linux-image/action\.yml' <<< "${files}" \
|| grep -q '\.github/actions/image-matrix/action\.sh' <<< "${files}" \
|| grep -q '\.github/actions/image-matrix/action\.yml' <<< "${files}" \
|| grep -q '\.github/workflows/build-and-test-image\.yml' <<< "${files}" \
`# Include all images if cmake, ninja, sccache, ` \
`# gitlab-cli, or utils features changed` \
|| grep -qE "(${common_features})" <<< "${features}" \
if `# Include all images if full_matrix is true` \
[ "${full_matrix}" == "1" ] \
`# Include all images if matrix or workflows changed` \
|| grep -q 'matrix\.yml' <<< "${files}" \
|| grep -q '\.github/actions/build-linux-image/' <<< "${files}" \
|| grep -q '\.github/actions/image-matrix/' <<< "${files}" \
|| grep -q '\.github/workflows/test\.yml' <<< "${files}" \
|| grep -q '\.github/workflows/build-test-and-push-linux-image\.yml' <<< "${files}" \
`# Include all images if cmake, ninja, sccache, ` \
`# gitlab-cli, or utils features changed` \
|| grep -qE "(${common_features})" <<< "${features}" \
; then
features="$( \
find features/src -mindepth 1 -maxdepth 1 -type d -print0 \
| xargs -0 -r -I% sh -c 'echo -n "\"$(basename %)\","' \
features="$( \
find features/src -mindepth 1 -maxdepth 1 -type d -print0 \
| xargs -0 -r -I% sh -c 'echo -n "\"$(basename %)\","' \
)";
features="[${features%,}]";
fi
Expand Down
11 changes: 6 additions & 5 deletions .github/actions/image-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ runs:
image/*
windows/**
matrix.yml
.github/**/*windows*
.github/actions/build-linux-image/action.yml
.github/actions/image-matrix/action.sh
.github/actions/image-matrix/action.yml
.github/actions/build-linux-image/*
.github/actions/build-windows-image/*
.github/actions/image-matrix/*
.github/actions/test-windows-image/*
.github/workflows/test.yml
.github/workflows/build-and-test-image.yml
.github/workflows/build-test-and-push-linux-image.yml
.github/workflows/build-test-and-push-windows-image.yml
- name: Report changes
if: inputs.full_matrix != 'true'
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release Windows

concurrency:
group: release-windows-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true

on:
workflow_dispatch:

jobs:

image-matrix:
name: Determine image matrix
runs-on: ubuntu-latest
outputs:
windows: ${{ steps.matrix.outputs.windows }}
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- id: matrix
name: Determine image matrix
uses: ./.github/actions/image-matrix
with:
full_matrix: 'true'

build-and-push-windows-images:
name: ${{ matrix.name }}
needs: image-matrix
secrets: inherit
uses: ./.github/workflows/build-test-and-push-windows-image.yml
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.image-matrix.outputs.windows) }}
with:
push: 'true'
os: "${{ matrix.os }}"
features: "${{ toJSON(matrix.features) }}"
container_env: "${{ toJSON(matrix.env) }}"
repo: "${{ vars.DOCKERHUB_REPOSITORY || github.repository }}"
16 changes: 0 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
runs-on: ubuntu-latest
outputs:
linux: ${{ steps.matrix.outputs.linux }}
windows: ${{ steps.matrix.outputs.windows }}
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
Expand Down Expand Up @@ -43,21 +42,6 @@ jobs:
container_env: "${{ toJSON(matrix.env) }}"
repo: "${{ vars.DOCKERHUB_REPOSITORY || github.repository }}"

build-and-push-windows-images:
name: ${{ matrix.name }}
needs: image-matrix
secrets: inherit
uses: ./.github/workflows/build-test-and-push-windows-image.yml
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.image-matrix.outputs.windows) }}
with:
push: 'true'
os: "${{ matrix.os }}"
features: "${{ toJSON(matrix.features) }}"
container_env: "${{ toJSON(matrix.env) }}"
repo: "${{ vars.DOCKERHUB_REPOSITORY || github.repository }}"

release-features:
needs: build-and-push-linux-images
name: Release Features
Expand Down
2 changes: 1 addition & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ sed_runner "s|features/\([[:alnum:]]\+\):[[:digit:]]\+\.[[:digit:]]\+\"|features

for file in $(find .devcontainer -name devcontainer.json); do
sed_runner "s|rapidsai/devcontainers:.*-cpp|rapidsai/devcontainers:${NEXT_SHORT_TAG}-cpp|g" "$file"
sed_runner "s@rapids-\${localWorkspaceFolderBasename}-${CURRENT_SHORT_TAG}@rapids-\${localWorkspaceFolderBasename}-${NEXT_SHORT_TAG}@g" "${file}"
sed_runner "s@rapids-\${localWorkspaceFolderBasename}-[0-9.]*@rapids-\${localWorkspaceFolderBasename}-${NEXT_SHORT_TAG}@g" "${file}"
done

sed_runner "s/branch-[[:digit:]]\{2\}\.[[:digit:]]\+/branch-${NEXT_SHORT_TAG}/g" ./features/src/rapids-build-utils/opt/rapids-build-utils/manifest.yaml
Expand Down
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NVIDIA RAPIDS devcontainer build utilities",
"id": "rapids-build-utils",
"version": "24.6.12",
"version": "24.6.13",
"description": "A feature to install the RAPIDS devcontainer build utilities",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ repos:
args: {cmake: -DFIND_RAFT_CPP=ON}
- name: raft-dask
sub_dir: python/raft-dask
depends: [raft]
depends: [ucxx, raft]
args: {cmake: -DFIND_RAFT_CPP=ON}

- name: cuvs
Expand Down
2 changes: 1 addition & 1 deletion features/src/rust/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "rust",
"version": "24.6.1",
"version": "24.6.2",
"name": "Rust",
"documentationURL": "https://github.com/rapidsai/devcontainers/features/tree/main/src/rust",
"description": "Installs Rust, common Rust utilities, and their required dependencies",
Expand Down
1 change: 1 addition & 0 deletions features/src/rust/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ else
curl -sSL --proto '=https' --tlsv1.2 "https://static.rust-lang.org/rustup/dist/${download_architecture}-unknown-linux-gnu/rustup-init" -o /tmp/rustup/target/${download_architecture}-unknown-linux-gnu/release/rustup-init;
curl -sSL --proto '=https' --tlsv1.2 "https://static.rust-lang.org/rustup/dist/${download_architecture}-unknown-linux-gnu/rustup-init.sha256" -o /tmp/rustup/rustup-init.sha256;
cd /tmp/rustup;
cp /tmp/rustup/target/${download_architecture}-unknown-linux-gnu/release/rustup-init /tmp/rustup/rustup-init
sha256sum -c rustup-init.sha256;
chmod +x target/${download_architecture}-unknown-linux-gnu/release/rustup-init;
target/${download_architecture}-unknown-linux-gnu/release/rustup-init -y --no-modify-path --profile ${RUSTUP_PROFILE} ${default_toolchain_arg};
Expand Down

0 comments on commit cb6f93e

Please sign in to comment.