Skip to content

Commit

Permalink
ci: add riscv64 dist job
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0n committed Jan 21, 2024
1 parent 9099f1c commit 363fa98
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/dist.yml → .github/workflows/dist-amd64.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Dist build
name: Dist build amd64

on: [push, pull_request]

jobs:
dist:
dist-amd64:
runs-on: ubuntu-latest
container:
image: ghcr.io/ruyisdk/ruyi-python-dist:20240121
Expand All @@ -17,19 +17,13 @@ jobs:
- /tmp/poetry-cache:/poetry-cache
- /tmp/ccache:/ccache

strategy:
matrix:
arch:
- amd64
# TODO: arm64 & riscv64

steps:
- uses: actions/checkout@v4

- name: Cache deps and Nuitka output
uses: actions/cache@v4
with:
key: ${{ runner.os }}-tgt-${{ matrix.arch }}-lock-${{ hashFiles('poetry.lock') }}
key: ${{ runner.os }}-tgt-amd64-lock-${{ hashFiles('poetry.lock') }}
path: |
/ccache
/poetry-cache
Expand All @@ -40,6 +34,6 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ruyi.${{ matrix.arch }}
name: ruyi.amd64
path: /build/ruyi
compression-level: 0 # the Nuitka onefile payload is already compressed
39 changes: 39 additions & 0 deletions .github/workflows/dist-riscv64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Dist build riscv64

on: [push, pull_request]

jobs:
dist-riscv64:
runs-on: [self-hosted, Linux, RISCV64]
container:
image: ghcr.io/ruyisdk/ruyi-python-dist:20240121
options: --user root # https://github.com/actions/checkout/issues/1014
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
volumes:
- .:/home/b/ruyi:ro
- /tmp/build:/build
- /tmp/poetry-cache:/poetry-cache
- /tmp/ccache:/ccache

steps:
- uses: actions/checkout@v4

- name: Cache deps and Nuitka output
uses: actions/cache@v4
with:
key: ${{ runner.os }}-tgt-riscv64-lock-${{ hashFiles('poetry.lock') }}
path: |
/ccache
/poetry-cache
- name: Run dist
run: /home/b/ruyi/scripts/dist-inner.sh

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ruyi.riscv64
path: /build/ruyi
compression-level: 0 # the Nuitka onefile payload is already compressed

0 comments on commit 363fa98

Please sign in to comment.