Skip to content

[autorelease] Update wasmtime version requirement from <26 to <28. #78

[autorelease] Update wasmtime version requirement from <26 to <28.

[autorelease] Update wasmtime version requirement from <26 to <28. #78

Workflow file for this run

on: [push, pull_request]
name: Build & publish
jobs:
build:
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.7'
- name: Install dependencies
run: |
python -m pip install setuptools_scm~=7.0 # for setup.py --version
sudo apt-get install flex bison ccache
- name: Set up caching
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ${{ runner.os }}-
- name: Set up ccache
run: |
ccache --max-size=2G -z
- name: Build WASM binaries
run: |
./build.sh
- name: Build binary wheels
run: |
pip wheel . -w dist/
- name: Upload binary wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/amaranth_yosys-*.whl
- name: Test binary wheels
run: |
pip install dist/amaranth_yosys-*.whl
python -m amaranth_yosys --help
python -m amaranth_yosys \
-p "read_ilang tests/inverter.il" \
-p "proc -nomux" \
-p "memory_collect" \
-p "write_verilog"
- name: Print ccache statistics
run: |
ccache -s
publish:
needs: build
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: wheel
path: dist/
- name: Publish wheels to Test PyPI
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/develop' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish wheels to PyPI
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/release' }}
uses: pypa/gh-action-pypi-publish@release/v1
release:
needs: build
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'autorelease') && github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PUSH_TOKEN }}
- name: Update release branch
run: |
git push origin develop:release