Skip to content

Commit

Permalink
Set default ubuntu to 22 and set zig for cross linux compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Nov 18, 2024
1 parent b6ef589 commit 2da6375
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/node-hub-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
find-jobs:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Find Jobs
outputs:
folders: ${{ steps.jobs.outputs.folders }}
Expand All @@ -33,7 +33,7 @@ jobs:
working-directory: node-hub/${{ matrix.folder }}
strategy:
matrix:
platform: [ubuntu-20.04, macos-12]
platform: [ubuntu-22.04, macos-12]
folder: ${{ fromJson(needs.find-jobs.outputs.folders )}}
fail-fast: false
steps:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
working-directory: node-hub/${{ matrix.folder }}
strategy:
matrix:
platform: [ubuntu-20.04, macos-12]
platform: [ubuntu-22.04, macos-12]
folder: ${{ fromJson(needs.find-jobs.outputs.folders )}}
fail-fast: false
runs-on: ${{ matrix.platform }}
Expand Down Expand Up @@ -141,7 +141,10 @@ jobs:
if [[ -f "Cargo.toml" && -f "pyproject.toml" ]]; then
echo "Publishing $dir using maturin..."
pip3 install "maturin[patchelf]"
maturin publish --skip-existing --zig
if [[ "${{ matrix.platform }}" == "ubuntu-latest" ]]; then
maturin publish --skip-existing --zig
else
maturin publish --skip-existing
else
if [ -f "pyproject.toml" ]; then
echo "Publishing $dir using Poetry..."
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/pip-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:
strategy:
matrix:
platform:
- runner: ubuntu-20.04
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-20.04
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-20.04
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-20.04
- runner: ubuntu-22.04
target: armv7
# - runner: ubuntu-20.04
# - runner: ubuntu-22.04
# target: s390x
# - runner: ubuntu-20.04
# - runner: ubuntu-22.04
# target: ppc64le
repository:
- path: apis/python/node
Expand Down Expand Up @@ -73,11 +73,11 @@ jobs:
strategy:
matrix:
platform:
- runner: ubuntu-20.04
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-20.04
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-20.04
- runner: ubuntu-22.04
target: aarch64
repository:
- path: apis/python/node
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
path: ${{ matrix.repository.path }}/dist

musleabi:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
platform:
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
path: ${{ matrix.repository.path }}/dist

sdist:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
repository:
Expand All @@ -235,7 +235,7 @@ jobs:

release:
name: Release
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
needs: [linux, musllinux, musleabi, windows, macos, sdist]
strategy:
Expand Down

0 comments on commit 2da6375

Please sign in to comment.