-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (64 loc) · 2.05 KB
/
ci.yml
File metadata and controls
71 lines (64 loc) · 2.05 KB
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
name: build-and-test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
env:
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
build-ubuntu:
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
build_type: [ release, debug ]
compiler: [ { "cc": "gcc", "cxx": "g++" } ]
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
steps:
- name: checkout
uses: actions/checkout@v5
with:
# get all the branches and tags
fetch-depth: 0
persist-credentials: false
- name: install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
libgl1-mesa-dev \
libssl-dev \
libtbb-dev \
libtool \
ninja-build \
pkg-config \
unzip
- name: setup cmake
uses: jwlawson/actions-setup-cmake@v2.2
with:
cmake-version: "3.31.0"
- name: setup xmake
uses: xmake-io/github-action-setup-xmake@v1.2.5
with:
xmake-version: "2.9.8"
actions-cache-folder: ".xmake-cache"
- name: build and test
run: |
if [ "${ACT:-}" = "true" ]; then
export XMAKE_ROOT=y
fi
xmake g --proxy_pac=github_mirror.lua
xmake f --test=y -m ${{ matrix.build_type }} -y
xmake build -y
xmake test