Skip to content

Commit

Permalink
ci(feat): add riscv64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
javalsai committed Sep 6, 2024
1 parent c9d52d2 commit f1f9d6b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/check-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ jobs:
name: build-aarch64
path: lidm-aarch64
retention-days: 1

build-linux-armv7:
name: Build for armv7
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -212,3 +213,47 @@ jobs:
name: build-armv7
path: lidm-armv7
retention-days: 1

build-linux-riscv64:
name: Build for riscv64
runs-on: ubuntu-24.04
permissions: write-all
needs: [spellcheck, shellcheck, clangcheck]
steps:
- uses: actions/checkout@v4

- uses: uraimo/run-on-arch-action@v2
with:
arch: riscv64
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
apt-get update && \
apt-get install -y make gcc libpam0g-dev
run: |
make -j$(nproc) 2> /tmp/stderr
cat /tmp/stderr >&2
mv lidm lidm-riscv64
- if: inputs.set-statuses
id: status
run: |
HSIZE="$(stat --printf="%s" lidm-riscv64 | numfmt --to=iec-i)B"
WARNS="$(cat /tmp/stderr | grep '^[^ ]*\.[ch]:' | wc -l)"
echo "DESCR='$HSIZE, $WARNS warnings'" >> "$GITHUB_OUTPUT"
- uses: myrotvorets/set-commit-status-action@master
if: inputs.set-statuses
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
description: ${{ steps.status.outputs.DESCR }}
context: Build for riscv64

- uses: actions/upload-artifact@v4
with:
name: build-riscv64
path: lidm-riscv64
retention-days: 1

0 comments on commit f1f9d6b

Please sign in to comment.