-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (108 loc) · 2.97 KB
/
xmake.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: XMake
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: |
sudo add-apt-repository ppa:xmake-io/xmake
sudo apt-get -y update
sudo apt-get -y install xmake
- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
sudo apt-get -y install clang-tidy-16
- name: Replace clang-tidy
run: sudo cp /usr/bin/clang-tidy-16 /usr/bin/clang-tidy -f
- name: Install GCC 12
run: sudo apt-get -y install gcc-12
- name: Configure GCC
env:
CC: gcc-12
CXX: gcc-12
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=envs
- name: Build GCC
env:
CC: gcc-12
CXX: gcc-12
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake b
- name: Configure Clang
env:
CC: clang-16
CXX: clang-16
working-directory: ${{github.workspace}}
run: |
rm -rf build .xmake
xmake f -c -y --toolchain=envs
- name: Build Clang
env:
CC: clang-16
CXX: clang-16
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: |
xmake b
xmake check clang.tidy
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Setup scoop
uses: MinoruSekine/setup-scoop@v2
with:
buckets: extras
scoop_checkup: true
scoop_update: true
update_path: true
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: Install XMake
run: scoop install xmake
- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=msvc
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake b
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: brew install xmake
- name: Install LLVM
run: xrepo install -y llvm
- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=xcode
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: |
xmake b -y
xmake check clang.tidy