Skip to content

Commit d48a620

Browse files
committed
Split test incantation into own step
1 parent 65d72a3 commit d48a620

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,14 @@ jobs:
6060
- name: Test
6161
run: |
6262
& $env:BASH_PATH -lc tools/build_gfortran.sh
63-
cp test.exe builds
64-
cp test_dyn.exe builds
65-
.\test.exe
66-
cp $OPENBLAS_ROOT\$BITS\bin\*.dll .
67-
.\test_dyn.exe
63+
echo "Static test"
64+
.\for_test\test.exe
65+
echo "Dynamic test"
66+
.\for_test\test_dyn.exe
67+
68+
- name: Copy
69+
run: |
70+
cp for_test\test*.exe builds
6871
6972
- uses: actions/upload-artifact@v3
7073
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ builds/
33
*~
44
*.pyc
55
*.swp
6-
test.exe
6+
for_test/

tools/build_gfortran.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22

33
set -e
44

5-
cd $(cygpath "$START_DIR")
5+
rm -rf for_test
6+
mkdir for_test
7+
cd for_test
8+
9+
repo_path=$(cygpath "$START_DIR")
610
OBP=$(cygpath $OPENBLAS_ROOT\\$BUILD_BITS)
711

812
static_libname=$(find $OBP/lib -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a' | tail -1)
913
dynamic_libname=$(find $OBP/lib -maxdepth 1 -type f -name '*.dll.a' | tail -1)
14+
dll_name=$(echo $dynamic_libname | sed 's#/lib/#/bin/#' | sed 's/.a$//')
15+
16+
cp $dll_name .
1017

1118
if [ "$INTERFACE64" == "1" ]; then
12-
gfortran -I $OBP/include -fdefault-integer-8 -o test.exe test64_.f90 $static_libname
13-
gfortran -I $OBP/include -fdefault-integer-8 -o test_dyn.exe test64_.f90 $dynamic_libname
19+
gfortran -I $OBP/include -fdefault-integer-8 -o test.exe ${repo_path}/test64_.f90 $static_libname
20+
gfortran -I $OBP/include -fdefault-integer-8 -o test_dyn.exe ${repo_path}/test64_.f90 $dynamic_libname
1421
else
15-
gfortran -I $OBP/include -o test.exe test.f90 $static_libname
16-
gfortran -I $OBP/include -o test_dyn.exe test.f90 $dynamic_libname
22+
gfortran -I $OBP/include -o test.exe ${start_path}/test.f90 $static_libname
23+
gfortran -I $OBP/include -o test_dyn.exe ${start_path}/test.f90 $dynamic_libname
1724
fi

0 commit comments

Comments
 (0)