allow for custom malloc in generated C code #140
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: Verification Tests | |
on: | |
push | |
jobs: | |
ci-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.19' | |
# seems the environments already come with recent-ish Swift! | |
# - name: Setup Swift | |
# uses: fwal/setup-swift@v1 | |
# with: | |
# swift-version: '5.5' | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- name: Install System Prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install valgrind | |
- name: Install Beschi and Python Prerequisites | |
run: | | |
python -m pip install --upgrade pip | |
pip install '.[dev]' | |
- name: Run Tests (Non-C) | |
run: pytest --skip c | |
- name: Run C Tests (clang) | |
run: CC=clang CXX=clang++ pytest --only c | |
- name: Run C Tests (gcc) | |
run: CC=gcc-9 CXX=g++-9 pytest --only c | |
ci-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Beschi and Python Prerequisites | |
run: | | |
python -m pip install --upgrade pip | |
pip install '.[dev]' | |
- name: Setup MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Run Tests | |
run: pytest --only c | |
publish: | |
runs-on: ubuntu-20.04 | |
needs: [ci-linux, ci-windows] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Prerequisites | |
run: | | |
python -m pip install --upgrade pip | |
pip install '.[publish]' | |
- name: Check Version | |
run: | | |
version=$(beschi --version | awk '{print $NF}') | |
git_tag=$(git describe --tags) | |
if [[ $version != $git_tag ]]; then | |
echo "Git tag does not match version string." | |
exit 1 | |
fi | |
- name: Build Distribution Package | |
run: | | |
rm -rf dist | |
python -m build | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |