Merge pull request #14 from gurgenyegoryan/main-dev #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-Release | |
on: | |
push: | |
branches: ["main-dev"] | |
pull_request: | |
branches: ["main-dev"] | |
env: | |
BUILD_TYPE: Release | |
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
PYTHONUTF8: 1 | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
jobs: | |
test_python_311: | |
name: Test Python | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macOS-11] # windows-2022 | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- run: git submodule update --init --recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Clang | |
run: brew install gcc@12 | |
if: ${{ matrix.os == 'macOS-11' }} | |
- name: Set up MinGW | |
uses: egor-tensin/setup-mingw@v2 | |
with: | |
platform: x64 | |
if: ${{ matrix.os == 'windows-2022' }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --no-cache-dir --upgrade pip | |
pip install --no-cache-dir pytest | |
- name: Build locally on Ubuntu | |
run: | | |
export CC=/usr/bin/gcc-12 | |
export CXX=/usr/bin/g++-12 | |
export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/:$LD_LIBRARY_PATH | |
python -m pip install . | |
if: ${{ matrix.os == 'ubuntu-22.04' }} | |
- name: Build locally on MacOS | |
run: | | |
export CC=/usr/local/bin/gcc-12 | |
export CXX=/usr/local/bin/g++-12 | |
python -m pip install . | |
if: ${{ matrix.os == 'macOS-11' }} | |
- name: Build locally on Windows | |
run: | | |
python -m pip install . | |
if: ${{ matrix.os == 'windows-2022' }} | |
- name: Test with PyTest | |
run: pytest python/test.py | |
test_python_37: | |
name: Test Python 3.7 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
python-version: ["3.7"] | |
steps: | |
- uses: actions/checkout@v3 | |
- run: git submodule update --init --recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --no-cache-dir --upgrade pip | |
pip install --no-cache-dir pytest | |
- name: Build locally | |
run: | | |
export CC=/usr/bin/gcc-12 | |
export CXX=/usr/bin/g++-12 | |
export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/:$LD_LIBRARY_PATH | |
python -m pip install . | |
- name: Test with PyTest | |
run: pytest python/test.py |