commit
d15bfd6d02
@ -0,0 +1,81 @@
|
||||
---
|
||||
name: 🍎 MacOS Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
env:
|
||||
COLORTERM: truecolor
|
||||
NPROC: 2
|
||||
TERM: xterm
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Install tools and libraries via Homebrew
|
||||
run: |
|
||||
brew install \
|
||||
coreutils \
|
||||
doctest \
|
||||
ffmpeg \
|
||||
libunistring \
|
||||
ncurses \
|
||||
pandoc \
|
||||
readline
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: cmake
|
||||
run: |
|
||||
pushd .
|
||||
mkdir "${HOME}/repos" && cd "${HOME}/repos"
|
||||
git clone https://github.com/nayuki/QR-Code-generator.git
|
||||
cd QR-Code-generator/c
|
||||
AR=/usr/local/opt/llvm/bin/llvm-ar
|
||||
make AR="${AR}"
|
||||
PREFIX=/usr/local
|
||||
cd ${PREFIX}/include && \
|
||||
ln -s "${HOME}/repos/QR-Code-generator/c" qrcodegen
|
||||
cd ${PREFIX}/lib && \
|
||||
ln -s "${HOME}/repos/QR-Code-generator/c/libqrcodegen.a" .
|
||||
popd
|
||||
mkdir build && cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS="-I/usr/local/include -L/usr/local/lib" \
|
||||
-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
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
- name: python wrappers
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pypandoc
|
||||
cd cffi
|
||||
python3 setup.py sdist build
|
||||
sudo 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
|
@ -1,171 +0,0 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
env:
|
||||
COLORTERM: truecolor
|
||||
NPROC: 2
|
||||
TERM: xterm
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- {
|
||||
icon: 🍎,
|
||||
os: macos,
|
||||
shell: bash --noprofile --norc -eo pipefail
|
||||
}
|
||||
- {
|
||||
icon: 🐧,
|
||||
os: ubuntu,
|
||||
shell: bash --noprofile --norc -eo pipefail
|
||||
}
|
||||
- {
|
||||
icon: 🏁,
|
||||
os: windows,
|
||||
shell: msys2
|
||||
}
|
||||
name: ${{ matrix.platform.icon }} ${{ matrix.platform.os }}
|
||||
runs-on: ${{ matrix.platform.os }}-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }} {0}
|
||||
|
||||
steps:
|
||||
|
||||
- name: Install tools and libraries via APT
|
||||
if: matrix.platform.os == 'ubuntu'
|
||||
run: |
|
||||
sudo apt install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
doctest-dev \
|
||||
ffmpeg \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libncurses-dev \
|
||||
libqrcodegen-dev \
|
||||
libreadline-dev \
|
||||
libswscale-dev \
|
||||
libunistring-dev \
|
||||
pandoc \
|
||||
pkg-config \
|
||||
python3-cffi \
|
||||
python3-dev \
|
||||
python3-setuptools
|
||||
|
||||
- name: Install tools and libraries via Homebrew
|
||||
if: matrix.platform.os == 'macos'
|
||||
run: |
|
||||
brew install \
|
||||
coreutils \
|
||||
doctest \
|
||||
ffmpeg \
|
||||
libunistring \
|
||||
ncurses \
|
||||
pandoc \
|
||||
readline
|
||||
|
||||
- name: Install tools and libraries via MSYS2
|
||||
if: matrix.platform.os == 'windows'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
# installing mingw-w64-x86_64-libxml2 is a workaround for:
|
||||
# https://github.com/msys2/MINGW-packages/issues/8658
|
||||
install: >
|
||||
base-devel
|
||||
git
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-ffmpeg
|
||||
mingw-w64-x86_64-libunistring
|
||||
mingw-w64-x86_64-libxml2
|
||||
mingw-w64-x86_64-ncurses
|
||||
mingw-w64-x86_64-rust
|
||||
mingw-w64-x86_64-toolchain
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: cmake
|
||||
run: |
|
||||
if [[ ${{ matrix.platform.os }} != ubuntu ]]; then
|
||||
pushd .
|
||||
mkdir "${HOME}/repos" && cd "${HOME}/repos"
|
||||
git clone https://github.com/nayuki/QR-Code-generator.git
|
||||
cd QR-Code-generator/c
|
||||
if [[ ${{ matrix.platform.os }} = macos ]]; then
|
||||
AR=/usr/local/opt/llvm/bin/llvm-ar
|
||||
else
|
||||
AR="$(which ar)"
|
||||
fi
|
||||
make AR="${AR}"
|
||||
if [[ ${{ matrix.platform.os }} = macos ]]; then
|
||||
PREFIX=/usr/local
|
||||
else
|
||||
PREFIX=/mingw64
|
||||
fi
|
||||
cd ${PREFIX}/include && \
|
||||
ln -s "${HOME}/repos/QR-Code-generator/c" qrcodegen
|
||||
cd ${PREFIX}/lib && \
|
||||
ln -s "${HOME}/repos/QR-Code-generator/c/libqrcodegen.a" .
|
||||
popd
|
||||
fi
|
||||
mkdir build && cd build
|
||||
if [[ ${{ matrix.platform.os }} = macos ]]; then
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS="-I/usr/local/include -L/usr/local/lib" \
|
||||
-DUSE_QRCODEGEN=on
|
||||
elif [[ ${{ matrix.platform.os }} = windows ]]; then
|
||||
cmake .. \
|
||||
-G "MSYS Makefiles" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DUSE_DOCTEST=off \
|
||||
-DUSE_PANDOC=off \
|
||||
-DUSE_QRCODEGEN=on
|
||||
else
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DUSE_QRCODEGEN=on
|
||||
fi
|
||||
|
||||
- name: make
|
||||
run: |
|
||||
cd build
|
||||
make -j${NPROC}
|
||||
|
||||
- name: ctest
|
||||
run: |
|
||||
cd build
|
||||
ctest --output-on-failure
|
||||
|
||||
- name: make install
|
||||
run: |
|
||||
cd build
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
- name: python wrappers
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pypandoc
|
||||
cd cffi
|
||||
python3 setup.py sdist build
|
||||
sudo 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
|
@ -0,0 +1,88 @@
|
||||
---
|
||||
name: 🐧 Tests on Ubuntu
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COLORTERM: truecolor
|
||||
TERM: xterm
|
||||
steps:
|
||||
- name: Install tools and libraries via APT
|
||||
run: |
|
||||
sudo apt install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
doctest-dev \
|
||||
ffmpeg \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libncurses-dev \
|
||||
libqrcodegen-dev \
|
||||
libreadline-dev \
|
||||
libswscale-dev \
|
||||
libunistring-dev \
|
||||
pandoc \
|
||||
pkg-config \
|
||||
python3-cffi \
|
||||
python3-dev \
|
||||
python3-setuptools
|
||||
|
||||
- name: Checkout manually
|
||||
run: |
|
||||
git clone "https://github.com/${GITHUB_REPOSITORY}" .
|
||||
|
||||
- name: cmake
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-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
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
- name: old python wrappers
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pypandoc
|
||||
cd cffi
|
||||
python3 setup.py sdist build
|
||||
sudo 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
|
||||
|
||||
- name: Build new python wrappers
|
||||
run: |
|
||||
cd python
|
||||
python3 setup.py build
|
||||
sudo python3 setup.py install
|
||||
python3 examples/000-print-version.py
|
@ -0,0 +1,89 @@
|
||||
---
|
||||
name: 🏁 Windows Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
env:
|
||||
COLORTERM: truecolor
|
||||
NPROC: 2
|
||||
TERM: xterm
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
|
||||
- name: Install tools and libraries via MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
# installing mingw-w64-x86_64-libxml2 is a workaround for:
|
||||
# https://github.com/msys2/MINGW-packages/issues/8658
|
||||
install: >
|
||||
base-devel
|
||||
git
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-ffmpeg
|
||||
mingw-w64-x86_64-libunistring
|
||||
mingw-w64-x86_64-libxml2
|
||||
mingw-w64-x86_64-ncurses
|
||||
mingw-w64-x86_64-rust
|
||||
mingw-w64-x86_64-toolchain
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: cmake
|
||||
run: |
|
||||
pushd .
|
||||
mkdir "${HOME}/repos" && cd "${HOME}/repos"
|
||||
git clone https://github.com/nayuki/QR-Code-generator.git
|
||||
cd QR-Code-generator/c
|
||||
AR="$(which ar)"
|
||||
make AR="${AR}"
|
||||
PREFIX=/mingw64
|
||||
cd ${PREFIX}/include && \
|
||||
ln -s "${HOME}/repos/QR-Code-generator/c" qrcodegen
|
||||
cd ${PREFIX}/lib && \
|
||||
ln -s "${HOME}/repos/QR-Code-generator/c/libqrcodegen.a" .
|
||||
popd
|
||||
mkdir build && cd build
|
||||
cmake .. \
|
||||
-G "MSYS Makefiles" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DUSE_DOCTEST=off \
|
||||
-DUSE_PANDOC=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
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
- name: python wrappers
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pypandoc
|
||||
cd cffi
|
||||
python3 setup.py sdist build
|
||||
sudo 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
|
Loading…
Reference in New Issue