Skip to content

Update dependencies. #590

Update dependencies.

Update dependencies. #590

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@v3
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Set up Rust
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-wasi
- name: Install dependencies
run: |
python -m pip install --upgrade pip build
sudo apt-get install flex bison ccache cmake libboost-program-options-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-python-dev
- name: Set up caching
uses: actions/cache@v3
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 iCE40 binary wheels
run: |
./package-pypi-ice40.sh
- name: Upload iCE40 binary wheel artifact
uses: actions/upload-artifact@v3
with:
name: wheel
path: pypi-ice40/dist/
- name: Test iCE40 binary wheels
run: |
pip install pypi-ice40/dist/*.whl
yowasp-icepll -h || true
yowasp-icebram -h || true
yowasp-icemulti -h || true
yowasp-icepack -h || true
yowasp-iceunpack -h || true
yowasp-nextpnr-ice40 --help
yowasp-nextpnr-ice40 --hx8k --package ct256 --test
yowasp-nextpnr-ice40 --up5k --package sg48 --test
- name: Build ECP5 binary wheels
run: |
./package-pypi-ecp5.sh
- name: Upload ECP5 binary wheel artifact
uses: actions/upload-artifact@v3
with:
name: wheel
path: pypi-ecp5/dist/
- name: Test ECP5 binary wheels
run: |
pip install pypi-ecp5/dist/*.whl
yowasp-ecppll --help || true
yowasp-ecpbram --help
yowasp-ecpmulti --help || true
yowasp-ecppack --help || true
yowasp-ecpunpack --help || true
yowasp-nextpnr-ecp5 --help
yowasp-nextpnr-ecp5 --um5g-25k --package CABGA381 --test
- name: Build MachXO2 binary wheels
run: |
./package-pypi-machxo2.sh
- name: Upload MachXO2 binary wheel artifact
uses: actions/upload-artifact@v3
with:
name: wheel
path: pypi-machxo2/dist/
- name: Test MachXO2 binary wheels
run: |
pip install pypi-machxo2/dist/*.whl
yowasp-xo2pll --help || true
yowasp-xo2bram --help
yowasp-xo2multi --help || true
yowasp-xo2pack --help || true
yowasp-xo2unpack --help || true
yowasp-nextpnr-machxo2 --help
yowasp-nextpnr-machxo2 --device LCMXO2-1200HC-4SG32C --test
- name: Build Nexus binary wheels
run: |
./package-pypi-nexus.sh
- name: Upload Nexus binary wheel artifact
uses: actions/upload-artifact@v3
with:
name: wheel
path: pypi-nexus/dist/
- name: Test Nexus binary wheels
run: |
pip install pypi-nexus/dist/*.whl
yowasp-prjoxide --help
yowasp-nextpnr-nexus --help
yowasp-nextpnr-nexus --device LIFCL-40-9BG400CES --test
- name: Build Gowin binary wheels
run: |
./package-pypi-gowin.sh
- name: Upload Gowin binary wheel artifact
uses: actions/upload-artifact@v3
with:
name: wheel
path: pypi-gowin/dist/
- name: Test Gowin binary wheels
run: |
pip install pypi-gowin/dist/*.whl
yowasp-nextpnr-gowin --help
yowasp-nextpnr-gowin --device GW1N-LV1QN48C6/I5 --test
- 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@v3
with:
name: wheel
path: dist/
- name: Publish wheels to Test PyPI
if: "github.event_name == 'push' && startsWith(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' && startsWith(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' && startsWith(github.event.ref, 'refs/heads/develop')"
steps:
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PUSH_TOKEN }}
- name: Update release branch
run: |
release_branch=${{ github.event.ref }}
release_branch=${release_branch/develop/release}
git push origin HEAD:${release_branch}