remove dash #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Set up MinGW | ||
uses: egor-tensin/setup-mingw@v2.2.0 | ||
with: | ||
platform: x64 | ||
version: 12.2.0 | ||
# Prep WIN64 | ||
- name: Create build folder | ||
run: mkdir ci | ||
- name: Setup wxWidgets for Win64 gui | ||
if: matrix.cl == 'gui' | ||
env: | ||
CC=x86_64-w64-mingw32-gcc | ||
CXX=x86_64-w64-mingw32-g++ | ||
shell: cmd | ||
run: | | ||
echo $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 | ||
cd wx/build/msw | ||
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 | ||
- 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 |