Skip to content

Commit

Permalink
Update actions to address Node 16 deprecation.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Jan 31, 2024
1 parent d57ad09 commit 5d170fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ on: [push, pull_request]
name: Build & publish
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
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@v3
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ${{ runner.os }}-
Expand All @@ -33,7 +33,7 @@ jobs:
run: |
pip wheel . -w dist/
- name: Upload binary wheel artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/amaranth_yosys-*.whl
Expand All @@ -53,30 +53,30 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- 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'
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/develop' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_token }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
- name: Publish wheels to PyPI
if: github.event_name == 'push' && github.event.ref == 'refs/heads/release'
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/release' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
release:
needs: build
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'autorelease') && github.event_name == 'push' && github.ref == 'refs/heads/develop'"
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@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PUSH_TOKEN }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/track-wasmtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.PUSH_TOKEN }}
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Check for a new release and update version requirement
Expand All @@ -21,27 +21,27 @@ jobs:
pip install git+https://github.com/whitequark/track-pypi-dependency-version.git
track-pypi-dependency-version --status $GITHUB_OUTPUT -r dependencies.txt wasmtime
- name: Install dependencies
if: steps.track-version.outputs.status == 'stale'
if: ${{ steps.track-version.outputs.status == 'stale' }}
run: |
python -m pip install setuptools_scm~=7.0 # for setup.py --version
sudo apt-get install flex bison ccache
- name: Set up caching
if: steps.track-version.outputs.status == 'stale'
uses: actions/cache@v3
if: ${{ steps.track-version.outputs.status == 'stale' }}
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ${{ runner.os }}-
- name: Build WASM binaries
if: steps.track-version.outputs.status == 'stale'
if: ${{ steps.track-version.outputs.status == 'stale' }}
run: |
./build.sh
- name: Test against updated version requirement
if: steps.track-version.outputs.status == 'stale'
if: ${{ steps.track-version.outputs.status == 'stale' }}
run: |
pip install .
python -m amaranth_yosys --help
- name: Push updated version requirement
if: steps.track-version.outputs.status == 'stale'
if: ${{ steps.track-version.outputs.status == 'stale' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: |
Expand Down

0 comments on commit 5d170fd

Please sign in to comment.