-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (47 loc) · 1.34 KB
/
build-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build (Linux)
on:
push:
paths:
- .github/workflows/build-linux.yml
- src/**
- xmake.lua
workflow_dispatch:
jobs:
build:
strategy:
matrix:
mode: [release, debug]
arch: [x86_64, arm64-v8a, mips64, mips64el]
runs-on: ubuntu-20.04 # for compatibility. todo: remove it
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup XMake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@dev
- uses: mlugg/setup-zig@v1
with:
version: 0.13.0
- name: Restore xmake cache
uses: actions/cache@v4
with:
path: |
~/.xmake
~/.cache/zig
key: xmake-linux-${{ matrix.arch }}-${{ hashFiles('xmake.lua') }}
restore-keys: |
xmake-linux-${{ matrix.arch }}-${{ matrix.mode }}-
- name: Sync with repository
run: |
xmake repo -u
- name: Build for host
run: |
xmake f -a ${{ matrix.arch }} -m ${{ matrix.mode }} -p linux -v -y
xmake -v -y
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: allay-launcher-linux-${{ matrix.arch }}-${{ matrix.mode }}
path: |
build/linux/${{ matrix.arch }}/${{ matrix.mode }}