notcurses/.github/workflows/windows_test.yml
2021-09-02 16:51:20 -04:00

95 lines
2.2 KiB
YAML

---
name: Windows
on:
pull_request:
push:
branches:
- master
jobs:
tests:
defaults:
run:
shell: msys2 {0}
env:
COLORTERM: truecolor
NPROC: 2
TERM: xterm
name: 🏁 build, test, & install
runs-on: windows-latest
steps:
- name: Install tools and libraries via MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >
base-devel
git
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-doctest
mingw-w64-ucrt-x86_64-ffmpeg
mingw-w64-ucrt-x86_64-libunistring
mingw-w64-ucrt-x86_64-ncurses
mingw-w64-ucrt-x86_64-toolchain
- uses: actions/checkout@v2
- name: Build libqrcodegen
run: |
mkdir "${HOME}/repos" && cd "${HOME}/repos"
git clone https://github.com/nayuki/QR-Code-generator.git
cd QR-Code-generator/c
make
cd /ucrt64/include && \
ln -s "${HOME}/repos/QR-Code-generator/c" ./qrcodegen
cd /ucrt64/lib && \
ln -s "${HOME}/repos/QR-Code-generator/c/libqrcodegen.a" ./libqrcodegen.a
- name: cmake
run: |
mkdir build && cd build
cmake .. \
-G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_DOCTEST=off \
-DUSE_PANDOC=off \
-DUSE_READLINE=off \
-DUSE_QRCODEGEN=on
- name: make
run: |
cd build
make -j${NPROC}
- name: ctest
run: |
cd build
#ctest --output-on-failure
- name: make install
run: |
cd build
make install
#- name: python wrappers
#run: |
#python3 -m pip install --upgrade pip
#pip install pypandoc
#cd cffi
#python3 setup.py sdist build
#python3 setup.py install
#notcurses-pydemo > /dev/null
#ncdirect-pydemo > /dev/null
- name: rust wrappers
run: |
cd rust
#rustc --version
#cargo build
#cargo t_all
#mingw-w64-ucrt-x86_64-rust