Skip to content

Remove cleaning step for more sense in error messages #11

Remove cleaning step for more sense in error messages

Remove cleaning step for more sense in error messages #11

Workflow file for this run

name: CI-Win-MinGW
on: [push]
jobs:
build:
runs-on: windows-latest
env:
testfail: false
strategy:
fail-fast: false
matrix:
cl: [gui, nogui]
release: [debug, release]
include:
- cl: gui
guiflag: yes
testsuffix: GUI
removeguitst:
wxoptions: -DwxWidgets_ROOT_DIR=..\wx -DwxWidgets_LIB_DIR=..\wx\lib\gcc_dll -DwxWidgets_CONFIGURATION=mswu
- cl: nogui
guiflag: no
testsuffix:
removeguitst: del gui.tst
wxoptions:
- release: debug
testoption: -s
- release: release
testoption:
steps:
- name: Checkout crystals
uses: actions/checkout@v3
# WIN ONLY
- name: Install MinGW compiler and tools
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-openblas mingw-w64-x86_64-perl msys2-w32api-runtime mingw-w64-x86_64-curl
# run: |
# where pacman.exe
# pacman --noconfirm -S
# Install wxWidgets - win GUI only
#
- name: Setup wxWidgets for Win64 gui
if: matrix.cl == 'gui'
shell: cmd
run: |
echo %PATH%
set PATH=C:\msys64\mingw64\bin;%PATH%
curl -LsS https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.5/wxWidgets-3.2.5.7z > wxw.7z
7z x wxw.7z -owx -y
dir
where gcc.exe
gcc --version
C:\mingw64\bin\gcc.exe --version
cd wx\build\msw
where mingw32-make.exe
mingw32-make.exe --version
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release setup_h
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release -j4
#
# Build WIN64
- name: Create build folder
run: mkdir ci
- name: Build CRYSTALS win64
working-directory: ci
shell: cmd
run: |
set PATH=C:\msys64\mingw64\bin;%PATH%
cmake .. -G"MinGW Makefiles" -DuseGUI=${{ matrix.guiflag }} -DMINGW=1 -DCMAKE_SH="CMAKE_SH-NOTFOUND" ${{ matrix.wxoptions }} -DCMAKE_BUILD_TYPE=${{ matrix.release }} || echo Try again
cmake .. -G"MinGW Makefiles" -DuseGUI=${{ matrix.guiflag }} -DMINGW=1 -DCMAKE_SH="CMAKE_SH-NOTFOUND" ${{ matrix.wxoptions }} -DCMAKE_BUILD_TYPE=${{ matrix.release }}
mingw32-make -j2
# Tests
- name: Test CRYSTALS windows
working-directory: test_suite
shell: cmd
# Prevent interactive scripts from running
# Prevent gui test from running for this cl version
# Setup environment
# Compcode sets folder with reference test outputs
# Go
run: |
set CRYSDIR=.\,..\ci\
set COMPCODE=MIN64GH${{ matrix.testsuffix }}
set OMP_NUM_THREADS=1
set PATH=C:\msys64\mingw64\bin;..\wx\lib\gcc_dll;%path%
echo PATH is %PATH%
echo CRYSDIR is %CRYSDIR%
ren MIN64GH${{ matrix.testsuffix }}.org safe.dir
for /d %%G in ("*.org") do rd /s /q "%%~G"
ren safe.dir MIN64GH${{ matrix.testsuffix }}.org
${{ matrix.removeguitst }}
mkdir script
echo "%SCRIPT NONE" > script\\tipauto.scp
echo "%END SCRIPT" >> script\\tipauto.scp
echo "%SCRIPT NONE" > script\\guideauto.scp
echo "%END SCRIPT" >> script\\guideauto.scp
perl ../editor/filepp.pl -ds -w -o diffin.tst -DTESTWIN diffin.tss
perl ../editor/filepp.pl -ds -w -o diffin2.tst -DTESTWIN diffin2.tss
perl ../editor/filepp.pl -ds -w -o diffin3.tst -DTESTWIN diffin3.tss
perl ../editor/filepp.pl -ds -w -o shelx2cry.tst -DTESTWIN shelx2cry.tss
perl testsuite.pl ${{ matrix.testoption }}
#
# If failures, set variable to trigger next two stages (one to tidy, one to upload)
- name: Tidy failed test outputs win64
working-directory: test_suite
if: failure()
shell: cmd
run: |
echo "testfail=true" >> $GITHUB_ENV
del /q MIN64GH${{ matrix.testsuffix }}.org
copy *.out MIN64GH${{ matrix.testsuffix }}.org
del /q *.*
- name: Upload outputs if failures
uses: actions/upload-artifact@v1
if: failure()
with:
name: test-outputs-win64-${{ matrix.cl }}
path: test_suite