Skip to content

syntax 2

syntax 2 #15

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: Set path for MINGW tools
shell: msys2
run: |
echo "/c/mingw64/bin" >> $GITHUB_PATH

Check failure on line 47 in .github/workflows/ci-mingw.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-mingw.yml

Invalid workflow file

You have an error in your yaml syntax on line 47
- name: Setup wxWidgets for Win64 gui
if: matrix.cl == 'gui'
shell: msys2
run: |
echo $PATH
# dir C:\msys64\mingw64
# dir C:\mingw64
# dir C:\msys64\mingw64\bin
# dir C:\mingw64\bin
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
which gcc.exe
gcc --version
/c/mingw64/bin/gcc.exe --version
cd wx/build/msw
which 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