Skip to content

Update pybind11 and enable meta build #42

Update pybind11 and enable meta build

Update pybind11 and enable meta build #42

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unittests
on:
push:
branches:
- master
- main
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
jobs:
unittests-first:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
strategy:
fail-fast: false
matrix:
python-version: [ '3.11', '3.12' ]
os: [ macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- name: Clone
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
python-version: ${{ matrix.python-version }}
username: ${{ secrets.PYPI_USERNAME }}
compiler-version-password: ${{ secrets.AMULET_COMPILER_VERSION_PYPI_PASSWORD }}
zlib-password: ${{ secrets.AMULET_ZLIB_PYPI_PASSWORD }}
nbt-password: ${{ secrets.AMULET_NBT_PYPI_PASSWORD }}
core-password: ${{ secrets.AMULET_CORE_PYPI_PASSWORD }}
rest-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install
env:
AMULET_FREEZE_COMPILER: 1
run: |
pip install --only-binary amulet-compiler-version,amulet-zlib,amulet-nbt,amulet-core -v .[dev]
python tools/compile_tests.py
- name: Test with unittest
run: python -m unittest discover -v -s tests
unittests-first-ubuntu:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
strategy:
fail-fast: false
matrix:
python-version: [ '3.11', '3.12' ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- name: Clone
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build and run unittests
uses: ./.github/actions/unittests-src
with:
python-version: ${{ matrix.python-version }}
unittests-third:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
python-version: [ '3.11', '3.12' ]
os: [ windows-latest, macos-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- name: Clone
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build and run unittests
uses: ./.github/actions/unittests-src
with:
python-version: ${{ matrix.python-version }}