feat(ci): build server for Linux ARM

This commit is contained in:
Elian Doran 2025-01-28 19:06:14 +02:00
parent ab9b5a6926
commit a2b6504d9d
No known key found for this signature in database
2 changed files with 31 additions and 13 deletions

View File

@ -92,7 +92,16 @@ jobs:
asset_content_type: application/zip # required by GitHub API
nightly-server:
name: Deploy server nightly
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
include:
- arch: x64
runs-on: ubuntu-latest
- arch: arm64
runs-on: ubuntu-24.04-arm
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set up node & dependencies
@ -102,22 +111,21 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Linux server build (x86_64)
- name: Run Linux server build
env:
MATRIX_ARCH: ${{ matrix.arch }}
run: |
npm run update-build-info
npm run ci-update-nightly-version
./bin/build-server.sh
- name: Prepare artifacts
if: runner.os != 'windows'
run: |
mkdir -p upload
file=$(find dist -name '*.tar.xz' -print -quit)
cp "$file" "upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz"
cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz"
- uses: actions/upload-artifact@v4
with:
name: TriliumNextNotes linux server x64
path: upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz
overwrite: true
name: TriliumNextNotes linux server ${{ matrix.arch }}
path: upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz
- name: Deploy release
uses: WebFreak001/deploy-nightly@v3.2.0

View File

@ -66,8 +66,17 @@ jobs:
fail_on_unmatched_files: true
files: upload/*.*
build_linux_server-x64:
name: Build Linux Server x86_64
runs-on: ubuntu-latest
name: Build Linux Server
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
include:
- arch: x64
runs-on: ubuntu-latest
- arch: arm64
runs-on: ubuntu-24.04-arm
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set up node & dependencies
@ -77,16 +86,17 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Linux server build (x86_64)
- name: Run Linux server build
env:
MATRIX_ARCH: ${{ matrix.arch }}
run: |
npm run update-build-info
./bin/build-server.sh
- name: Prepare artifacts
if: runner.os != 'windows'
run: |
mkdir -p upload
file=$(find dist -name '*.tar.xz' -print -quit)
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-server-linux-x64.tar.xz"
cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz"
- name: Publish release
uses: softprops/action-gh-release@v2
with: