Skip to content

Copy the right dlls #548

Copy the right dlls

Copy the right dlls #548

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\gcc810_x64_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
run: |
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-openblas mingw-w64-x86_64-perl msys2-w32api-runtime mingw-w64-x86_64-curl
# Install wxWidgets - win GUI only
#
- name: Setup wxWidgets for Win64 gui
if: matrix.cl == 'gui'
shell: cmd
run: |
curl -LsS https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxMSW-3.2.6_gcc1420_x64_Dev.7z > dev.7z
curl -LsS https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxWidgets-3.2.6-headers.7z > head.7z
7z x dev.7z -owx -y
7z x head.7z -owx -y
dir
#
- name: Create build folder
run: mkdir ci
# Build WIN64
#
# set PATH=D:\a\_temp\msys\msys64\mingw64\bin;%PATH%
- 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
# set PATH=D:\a\_temp\msys\msys64\mingw64\bin;..\wx\lib\gcc810_x64_dll;%path%
run: |
set CRYSDIR=.\,..\ci\
set COMPCODE=MIN64GH${{ matrix.testsuffix }}
set OMP_NUM_THREADS=1
set PATH=C:\msys64\mingw64\bin;..\wx\lib\gcc810_x64_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