Skip to content

Commit 57a50fa

Browse files
authored
Allow running "verify release candidate" github workflow on Windows (#1392)
* run for windows * readme
1 parent 2208665 commit 57a50fa

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

.github/workflows/verify-release-candidate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ jobs:
5858
arch: x64
5959
runner: macos-15-intel
6060

61-
# Windows (disabled for now)
62-
# - os: windows
63-
# arch: x64
64-
# runner: windows-latest
61+
# Windows
62+
- os: windows
63+
arch: x64
64+
runner: windows-latest
6565
runs-on: ${{ matrix.runner }}
6666
steps:
6767
- name: Checkout repository

dev/release/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ python3 -m twine upload --repository testpypi dist/datafusion-0.7.0.tar.gz
158158

159159
Before sending the vote email, run the manually triggered GitHub Actions workflow
160160
"Verify Release Candidate" and confirm all matrix jobs pass across the OS/architecture matrix
161-
(for example, Linux and macOS runners):
161+
(for example, Linux, macOS, and Windows runners):
162162

163163
1. Go to https://github.com/apache/datafusion-python/actions/workflows/verify-release-candidate.yml
164164
2. Click "Run workflow"

dev/release/verify-release-candidate.sh

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,17 @@ test_source_distribution() {
112112

113113
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
114114

115-
export PATH=$RUSTUP_HOME/bin:$PATH
116-
source $RUSTUP_HOME/env
115+
# On Unix, rustup creates an env file. On Windows GitHub runners (MSYS bash),
116+
# that file may not exist, so fall back to adding Cargo bin directly.
117+
if [ -f "$CARGO_HOME/env" ]; then
118+
# shellcheck disable=SC1090
119+
source "$CARGO_HOME/env"
120+
elif [ -f "$RUSTUP_HOME/env" ]; then
121+
# shellcheck disable=SC1090
122+
source "$RUSTUP_HOME/env"
123+
else
124+
export PATH="$CARGO_HOME/bin:$PATH"
125+
fi
117126

118127
# build and test rust
119128

@@ -126,10 +135,20 @@ test_source_distribution() {
126135
git clone https://github.com/apache/parquet-testing.git parquet-testing
127136

128137
python3 -m venv .venv
129-
source .venv/bin/activate
130-
python3 -m pip install -U pip
131-
python3 -m pip install -U maturin
132-
maturin develop
138+
if [ -x ".venv/bin/python" ]; then
139+
VENV_PYTHON=".venv/bin/python"
140+
elif [ -x ".venv/Scripts/python.exe" ]; then
141+
VENV_PYTHON=".venv/Scripts/python.exe"
142+
elif [ -x ".venv/Scripts/python" ]; then
143+
VENV_PYTHON=".venv/Scripts/python"
144+
else
145+
echo "Unable to find python executable in virtual environment"
146+
exit 1
147+
fi
148+
149+
"$VENV_PYTHON" -m pip install -U pip
150+
"$VENV_PYTHON" -m pip install -U maturin
151+
"$VENV_PYTHON" -m maturin develop
133152

134153
#TODO: we should really run tests here as well
135154
#python3 -m pytest

0 commit comments

Comments
 (0)