File tree 2 files changed +73
-11
lines changed
2 files changed +73
-11
lines changed Original file line number Diff line number Diff line change
1
+ name : Build (Linux)
2
+
3
+ on :
4
+ push :
5
+ paths :
6
+ - .github/workflows/build-linux.yml
7
+ - src/**
8
+ - xmake.lua
9
+ workflow_dispatch :
10
+
11
+ jobs :
12
+ build :
13
+ strategy :
14
+ matrix :
15
+ mode : [debug, release]
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : Checkout
19
+ uses : actions/checkout@v4
20
+
21
+ # - name: Prepare works
22
+ # run: |
23
+ # mkdir ./.xmake-dest
24
+
25
+ - name : Restore build cache
26
+ uses : actions/cache@v4
27
+ with :
28
+ path : |
29
+ ~/.xmake
30
+ ./.xmake-dest
31
+ key : xmake-linux-${{ hashFiles('xmake.lua') }}
32
+ restore-keys : |
33
+ xmake-linux-
34
+
35
+ - name : Setup XMake
36
+ uses : xmake-io/github-action-setup-xmake@v1
37
+ with :
38
+ xmake-version : ' 2.9.8'
39
+ actions-cache-folder : ' ./.xmake-dest'
40
+
41
+ - name : Install build dependencies
42
+ run : |
43
+ sudo apt install -y build-essential llvm-19-dev libclang-19-dev
44
+
45
+ # workaround to switch llvm version.
46
+ sudo mv /usr/include/clang /usr/include/clang-compiler
47
+ sudo ln -s /usr/lib/llvm-19/bin/llvm-config /usr/bin/llvm-config
48
+ sudo ln -s /usr/include/llvm-19/llvm /usr/include/llvm
49
+ sudo ln -s /usr/include/llvm-c-19/llvm-c /usr/include/llvm-c
50
+ sudo ln -s /usr/lib/llvm-19/include/clang /usr/include/clang
51
+ sudo ln -s /usr/lib/llvm-19/include/clang-c /usr/include/clang-c
52
+
53
+
54
+ - name : Configure
55
+ run : |
56
+ # c++23 <print> requires gcc 14.
57
+ xmake f -a x64 -m ${{ matrix.mode }} -p linux --toolchain=gcc-14 -v -y
58
+
59
+ - name : Build
60
+ run : |
61
+ xmake -v -y
62
+
63
+ - name : Upload Artifact
64
+ uses : actions/upload-artifact@v4
65
+ with :
66
+ name : debuginfo-${{ matrix.mode }}-linux-x64-${{ github.sha }}
67
+ path : |
68
+ build/linux/x64/${{ matrix.mode }}
Original file line number Diff line number Diff line change @@ -63,8 +63,12 @@ target('libdi')
63
63
remove_files (' src/tools/**' )
64
64
set_basename (' di' )
65
65
66
+ add_ldflags (' $(shell llvm-config --libs)' ) -- xrepo llvm bug?
67
+
66
68
add_packages (
67
- ' nlohmann_json'
69
+ ' xxhash' ,
70
+ ' nlohmann_json' ,
71
+ ' llvm'
68
72
)
69
73
70
74
target (' askrva' )
@@ -111,27 +115,17 @@ target('extractsym')
111
115
set_pcxxheader (' src/pch.h' )
112
116
113
117
add_packages (
114
- ' llvm' ,
115
118
' nlohmann_json' ,
116
119
' argparse'
117
120
)
118
121
119
- if is_plat (' linux' ) then -- workaround to fix link problem.
120
- add_links (' LLVM' )
121
- end
122
-
123
122
target (' makepdb' )
124
123
set_kind (' binary' )
125
124
add_deps (' libdi' )
126
125
add_files (' src/tools/makepdb/**.cpp' )
127
126
set_pcxxheader (' src/pch.h' )
128
127
129
128
add_packages (
130
- ' llvm' ,
131
129
' nlohmann_json' ,
132
130
' argparse'
133
131
)
134
-
135
- if is_plat (' linux' ) then
136
- add_links (' LLVM' )
137
- end
You can’t perform that action at this time.
0 commit comments