Skip to content

Commit c758612

Browse files
committed
Port to Powershell and RTools
1 parent b6ffba4 commit c758612

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Windows build
22

3-
defaults:
4-
run:
5-
shell: bash
6-
73
on:
84
push:
95
branches: [ master ]
@@ -13,6 +9,9 @@ on:
139
env:
1410
OPENBLAS_COMMIT: "bfd9c1b58cd3"
1511
OPENBLAS_ROOT: "c:\\opt"
12+
# Preserve working directory for calls into bash
13+
CHERE_INVOKING: "yes"
14+
BASH_PATH: "c:\\rtools40\\usr\\bin\\bash"
1615

1716
jobs:
1817
build:
@@ -32,46 +31,40 @@ jobs:
3231
- name: install-rtools
3332
run: |
3433
choco install rtools --no-progress
35-
- name: show-gfortran
36-
run: |
37-
gcc --version
38-
gfortran --version
3934
4035
- name: Set env variables
4136
run: |
42-
BITS=${{ matrix.BUILD_BITS }}
43-
echo "BUILD_BITS=$BITS" >> $GITHUB_ENV;
37+
$BITS = ${{ matrix.BUILD_BITS }}
38+
echo "BUILD_BITS=$BITS" >> $GITHUB_ENV
4439
# For interpretation of MSYSTEM, see:
4540
# https://sourceforge.net/p/msys2/discussion/general/thread/b7dfdac8/#3939
46-
if [ "$BITS" == "32" ]; then
41+
if ($BITS" -eq 32 ) {
4742
echo "PLAT=i686" >> $GITHUB_ENV
4843
echo "MSYSTEM=MINGW32" >> $GITHUB_ENV
4944
echo "LDFLAGS='-static -static-libgcc'" >> $GITHUB_ENV
50-
else
45+
} else {
5146
echo "PLAT=x86_64" >> $GITHUB_ENV
5247
echo "MSYSTEM=UCRT64" >> $GITHUB_ENV
5348
echo "LDFLAGS='-lucrt -static -static-libgcc'" >> $GITHUB_ENV
54-
fi
49+
}
5550
echo "START_DIR=$PWD" >> $GITHUB_ENV
56-
if [ "${{ matrix.INTERFACE64 }}" == "1" ]; then
51+
if ( ${{ matrix.INTERFACE64 }} == 1 ) {
5752
echo "INTERFACE64=1" >> $GITHUB_ENV
58-
fi
59-
# Preserve the current working directory in bash call.
60-
echo "CHERE_INVOKING='yes'" >> $GITHUB_ENV
53+
}
6154
6255
- name: Build
6356
run: |
6457
git submodule update --init --recursive
65-
/c/rtools40/usr/bin/bash -lc tools/build_openblas.sh
58+
& $env:BASH_PATH -lc tools\build_openblas.sh
6659
6760
- name: Test
6861
run: |
69-
tools/build_gfortran.sh
62+
& $env:BASH_PATH -lc tools\build_gfortran.sh
7063
cp test.exe builds
7164
cp test_dyn.exe builds
72-
./test.exe
73-
cp $(cygpath $OPENBLAS_ROOT)/$BITS/bin/*.dll .
74-
./test_dyn.exe
65+
.\test.exe
66+
cp $OPENBLAS_ROOT\$BITS\bin\*.dll .
67+
.\test_dyn.exe
7568
7669
- uses: actions/upload-artifact@v3
7770
with:
@@ -82,4 +75,4 @@ jobs:
8275
OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN: ${{ secrets.MULTIBUILD_WHEELS_STAGING_ACCESS }}
8376
run: |
8477
pip install -q git+https://github.com/Anaconda-Platform/[email protected]
85-
tools/upload_to_anaconda_staging.sh
78+
& $env:BASH_PATH -lc tools\upload_to_anaconda_staging.sh

0 commit comments

Comments
 (0)