Skip to content

Commit a4b83bf

Browse files
committed
add CI
1 parent cfaf122 commit a4b83bf

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
# see more at https://github.com/DavidingPlus/nvmixfs/issues/1
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
container:
14+
image: ubuntu:20.04
15+
env:
16+
# change your own kernel version here.
17+
KERNEL_VERSION: "5.4.0-208-generic"
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install Dependencies
23+
run: |
24+
25+
apt update
26+
27+
apt install curl build-essential -y
28+
29+
apt install linux-headers-${KERNEL_VERSION} -y
30+
31+
- name: Install XMake
32+
run: |
33+
34+
curl -fsSL https://xmake.io/shget.text | bash
35+
36+
# use xmake as root
37+
alias xmake="~/.local/bin/xmake"
38+
export XMAKE_ROOT=y
39+
40+
# keep xmake up to date
41+
xmake update -s dev
42+
43+
- name: Configure XMake
44+
working-directory: ${{github.workspace}}
45+
run: |
46+
47+
alias xmake="~/.local/bin/xmake"
48+
export XMAKE_ROOT=y
49+
50+
xmake f -m release --linux-headers=/usr/src/linux-headers-${KERNEL_VERSION}/
51+
52+
- name: Build Targets
53+
working-directory: ${{github.workspace}}
54+
run: |
55+
56+
alias xmake="~/.local/bin/xmake"
57+
export XMAKE_ROOT=y
58+
59+
xmake build

0 commit comments

Comments
 (0)