|
|
@ -1,8 +1,11 @@
|
|
|
|
---
|
|
|
|
---
|
|
|
|
name: 🍎 MacOS Tests
|
|
|
|
name: macOS
|
|
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
push:
|
|
|
|
|
|
|
|
branches:
|
|
|
|
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
tests:
|
|
|
@ -10,6 +13,7 @@ jobs:
|
|
|
|
COLORTERM: truecolor
|
|
|
|
COLORTERM: truecolor
|
|
|
|
NPROC: 2
|
|
|
|
NPROC: 2
|
|
|
|
TERM: xterm
|
|
|
|
TERM: xterm
|
|
|
|
|
|
|
|
name: 🍎 build, test, & install
|
|
|
|
runs-on: macos-latest
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
@ -27,24 +31,27 @@ jobs:
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
|
|
- name: cmake
|
|
|
|
- name: Build libqrcodegen
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
pushd .
|
|
|
|
|
|
|
|
mkdir "${HOME}/repos" && cd "${HOME}/repos"
|
|
|
|
mkdir "${HOME}/repos" && cd "${HOME}/repos"
|
|
|
|
git clone https://github.com/nayuki/QR-Code-generator.git
|
|
|
|
git clone https://github.com/nayuki/QR-Code-generator.git
|
|
|
|
cd QR-Code-generator/c
|
|
|
|
cd QR-Code-generator/c
|
|
|
|
AR=/usr/local/opt/llvm/bin/llvm-ar
|
|
|
|
AR=/usr/local/opt/llvm/bin/llvm-ar
|
|
|
|
make AR="${AR}"
|
|
|
|
make AR="${AR}"
|
|
|
|
PREFIX=/usr/local
|
|
|
|
mkdir -p "${HOME}"/opt/qrcodegen/{include,lib}
|
|
|
|
cd ${PREFIX}/include && \
|
|
|
|
cd "${HOME}/opt/qrcodegen/include" \
|
|
|
|
ln -s "${HOME}/repos/QR-Code-generator/c" qrcodegen
|
|
|
|
&& ln -s "${HOME}/repos/QR-Code-generator/c" ./qrcodegen
|
|
|
|
cd ${PREFIX}/lib && \
|
|
|
|
cd "${HOME}/opt/qrcodegen/lib" \
|
|
|
|
ln -s "${HOME}/repos/QR-Code-generator/c/libqrcodegen.a" .
|
|
|
|
&& ln -s "${HOME}/repos/QR-Code-generator/c/libqrcodegen.a" ./libqrcodegen.a
|
|
|
|
popd
|
|
|
|
cd /usr/local/opt && ln -s "${HOME}/opt/qrcodegen" ./qrcodegen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: cmake
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig"
|
|
|
|
mkdir build && cd build
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. \
|
|
|
|
cmake .. \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_C_FLAGS="-I/usr/local/include -L/usr/local/lib" \
|
|
|
|
-DCMAKE_C_FLAGS="-I/usr/local/opt/qrcodegen/include -L/usr/local/opt/qrcodegen/lib" \
|
|
|
|
-DUSE_QRCODEGEN=on
|
|
|
|
-DUSE_QRCODEGEN=on
|
|
|
|
|
|
|
|
|
|
|
|
- name: make
|
|
|
|
- name: make
|
|
|
@ -61,20 +68,27 @@ jobs:
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
cd build
|
|
|
|
cd build
|
|
|
|
sudo make install
|
|
|
|
sudo make install
|
|
|
|
sudo ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: python wrappers
|
|
|
|
- name: python wrappers (old)
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
pip install pypandoc
|
|
|
|
pip install cffi pypandoc
|
|
|
|
cd cffi
|
|
|
|
cd cffi
|
|
|
|
python3 setup.py sdist build
|
|
|
|
python3 setup.py sdist build
|
|
|
|
sudo python3 setup.py install
|
|
|
|
sudo python3 setup.py install
|
|
|
|
notcurses-pydemo > /dev/null
|
|
|
|
notcurses-pydemo > /dev/null
|
|
|
|
ncdirect-pydemo > /dev/null
|
|
|
|
ncdirect-pydemo > /dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: python wrappers (new)
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
cd python
|
|
|
|
|
|
|
|
python3 setup.py build
|
|
|
|
|
|
|
|
sudo python3 setup.py install
|
|
|
|
|
|
|
|
python3 examples/000-print-version.py
|
|
|
|
|
|
|
|
|
|
|
|
- name: rust wrappers
|
|
|
|
- name: rust wrappers
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH="/usr/local/libdata/pkgconfig"
|
|
|
|
cd rust
|
|
|
|
cd rust
|
|
|
|
rustc --version
|
|
|
|
rustc --version
|
|
|
|
cargo build
|
|
|
|
cargo build
|
|
|
|