ci(feat): add aarch64 build

This commit is contained in:
javalsai 2024-09-06 21:58:32 +02:00
parent 4bb8563e4d
commit 69ee14ff92
Signed by: javalsai
SSH Key Fingerprint: SHA256:3G83yKhBUWVABVX/vPWH88xnK4+ptMtHkZGCRXD4Mk8
2 changed files with 47 additions and 3 deletions

View File

@ -61,7 +61,7 @@ jobs:
version: 1.0 version: 1.0
- id: build - id: build
run: | run: |
make CFLAGS="-O3 -Wall" 2> /tmp/stderr make -j$(nproc) 2> /tmp/stderr
cat /tmp/stderr >&2 cat /tmp/stderr >&2
HSIZE="$(stat --printf="%s" lidm | numfmt --to=iec-i)B" HSIZE="$(stat --printf="%s" lidm | numfmt --to=iec-i)B"
@ -103,7 +103,7 @@ jobs:
- id: build - id: build
run: | run: |
make CFLAGS="-O3 -Wall -m32" 2> /tmp/stderr make -j$(nproc) CFLAGS="-O3 -Wall -m32" 2> /tmp/stderr
cat /tmp/stderr >&2 cat /tmp/stderr >&2
HSIZE="$(stat --printf="%s" lidm | numfmt --to=iec-i)B" HSIZE="$(stat --printf="%s" lidm | numfmt --to=iec-i)B"
@ -125,3 +125,47 @@ jobs:
name: build-i386 name: build-i386
path: lidm-i386 path: lidm-i386
retention-days: 1 retention-days: 1
build-linux-aarch64:
name: Build for aarch64
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: aarch64
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-aarch64
- if: inputs.set-statuses
id: status
run: |
HSIZE="$(stat --printf="%s" lidm-aarch64 | 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 aarch64
- uses: actions/upload-artifact@v4
with:
name: build-aarch64
path: lidm-aarch64
retention-days: 1

View File

@ -6,7 +6,7 @@ ODIR=dist
PREFIX=/usr PREFIX=/usr
CC?=gcc CC?=gcc
CFLAGS?=-O3 CFLAGS?=-O3 -Wall
_CFLAGS=-I$(DIR) _CFLAGS=-I$(DIR)
ALLFLAGS=$(CFLAGS) -I$(IDIR) ALLFLAGS=$(CFLAGS) -I$(IDIR)