2021-06-14 18:17:34 +00:00
|
|
|
---
|
2021-07-14 16:55:17 +00:00
|
|
|
name: macOS
|
2021-06-14 18:17:34 +00:00
|
|
|
|
|
|
|
on:
|
2021-07-14 16:55:17 +00:00
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-06-14 18:17:34 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
env:
|
|
|
|
COLORTERM: truecolor
|
|
|
|
NPROC: 2
|
|
|
|
TERM: xterm
|
2021-07-14 16:55:17 +00:00
|
|
|
name: 🍎 build, test, & install
|
2021-06-14 18:17:34 +00:00
|
|
|
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
|
|
|
|
|
2021-07-14 16:55:17 +00:00
|
|
|
- name: Build libqrcodegen
|
2021-06-14 18:17:34 +00:00
|
|
|
run: |
|
|
|
|
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}"
|
2021-07-14 16:55:17 +00:00
|
|
|
mkdir -p "${HOME}"/opt/qrcodegen/{include,lib}
|
|
|
|
cd "${HOME}/opt/qrcodegen/include" \
|
|
|
|
&& ln -s "${HOME}/repos/QR-Code-generator/c" ./qrcodegen
|
|
|
|
cd "${HOME}/opt/qrcodegen/lib" \
|
|
|
|
&& ln -s "${HOME}/repos/QR-Code-generator/c/libqrcodegen.a" ./libqrcodegen.a
|
|
|
|
cd /usr/local/opt && ln -s "${HOME}/opt/qrcodegen" ./qrcodegen
|
|
|
|
|
|
|
|
- name: cmake
|
|
|
|
run: |
|
2021-06-14 18:17:34 +00:00
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2021-07-14 16:55:17 +00:00
|
|
|
-DCMAKE_C_FLAGS="-I/usr/local/opt/qrcodegen/include -L/usr/local/opt/qrcodegen/lib" \
|
2021-06-14 18:17:34 +00:00
|
|
|
-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
|
|
|
|
|
2021-07-14 16:55:17 +00:00
|
|
|
- name: python wrappers (old)
|
2021-06-14 18:17:34 +00:00
|
|
|
run: |
|
|
|
|
python3 -m pip install --upgrade pip
|
2021-07-14 16:55:17 +00:00
|
|
|
pip install cffi pypandoc
|
2021-06-14 18:17:34 +00:00
|
|
|
cd cffi
|
|
|
|
python3 setup.py sdist build
|
|
|
|
sudo python3 setup.py install
|
|
|
|
notcurses-pydemo > /dev/null
|
|
|
|
ncdirect-pydemo > /dev/null
|
|
|
|
|
2021-07-14 16:55:17 +00:00
|
|
|
- name: python wrappers (new)
|
|
|
|
run: |
|
|
|
|
cd python
|
|
|
|
python3 setup.py build
|
|
|
|
sudo python3 setup.py install
|
|
|
|
python3 examples/000-print-version.py
|
|
|
|
|
2021-06-14 18:17:34 +00:00
|
|
|
- name: rust wrappers
|
|
|
|
run: |
|
2021-07-14 16:55:17 +00:00
|
|
|
export PKG_CONFIG_PATH="/usr/local/libdata/pkgconfig"
|
2021-06-14 18:17:34 +00:00
|
|
|
cd rust
|
|
|
|
rustc --version
|
|
|
|
cargo build
|
|
|
|
cargo t_all
|