-
Notifications
You must be signed in to change notification settings - Fork 1
142 lines (107 loc) · 4.25 KB
/
ci-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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Build and Release (Linux)
on:
push:
branches:
- main
tags:
- '*'
paths-ignore:
- '**.md'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
paths-ignore:
- '**.md'
- 'changelog.lua'
- '.gitignore'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
if: github.event.pull_request.draft == false
name: Build for Linux
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: "0" # Required so that git describe actually works (and we can embed the version tag)
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1.2
- name: Update apt cache
run: sudo apt-get update
- name: Install Ninja
run: sudo apt-get install ninja-build
- name: Install n2
run: cargo install --git https://github.com/evmar/n2
# Can't actually be used on CI runners, but we need the headers for embedding webview
- name: Install WebKitGTK
run: sudo apt-get install gtk+-3.0-dev webkit2gtk-4.0-dev --yes
- name: Install PulseAudio
run: sudo apt-get install pulseaudio libpulse-dev --yes
- name: Set up virtual audio device # Required for LabSound tests
run: pulseaudio --start --load="module-null-sink" --exit-idle-time=-1
- name: Configure environment
run: |
export PATH="/usr/lib/ccache:$PATH"
echo "CC=/usr/lib/ccache/gcc" >> $GITHUB_ENV
echo "CXX=/usr/lib/ccache/g++" >> $GITHUB_ENV
- name: Generate versions.lua # Required for those libraries that don't export versioning information
run: deps/discover-submodule-versions.sh && cat deps/versions.lua
- name: Build luajit
run: deps/luajit-unixbuild.sh && ls ninjabuild-unix
- name: Build wgpu
run: deps/wgpu-unixbuild.sh && ls ninjabuild-unix
- name: Build luv and libuv
run: deps/luv-unixbuild.sh && ls ninjabuild-unix
- name: Build glfw
run: deps/glfw-unixbuild.sh && ls ninjabuild-unix
- name: Build miniz
run: deps/miniz-unixbuild.sh && ls ninjabuild-unix
- name: Build rapidjson
run: deps/rapidjson-unixbuild.sh && ls ninjabuild-unix
- name: Build openssl
run: deps/openssl-unixbuild.sh && ls ninjabuild-unix
- name: Build lua-openssl
run: deps/luaopenssl-unixbuild.sh && ls ninjabuild-unix
- name: Build zlib
run: deps/zlib-unixbuild.sh && ls ninjabuild-unix
- name: Build pcre
run: deps/pcre-unixbuild.sh && ls ninjabuild-unix
- name: Build uwebsockets
run: deps/uws-unixbuild.sh && ls ninjabuild-unix
- name: Build RmlUI with FreeType
run: deps/rml-unixbuild.sh && ls ninjabuild-unix
- name: Build LabSound
run: deps/labsound-unixbuild.sh && ls ninjabuild-unix
- name: Build runtime
run: ls && ./unixbuild.sh && ls ninjabuild-unix && cp ninjabuild-unix/evo . && ls
- name: Add executable to PATH
run: echo "$(pwd)" >> $GITHUB_PATH
- name: Run smoke tests
run: evo Tests/smoke-test.lua
- name: Run snapshot tests
run: evo Tests/snapshot-test.lua
- name: Run unit tests
run: xvfb-run evo Tests/unit-test.lua
- name: Run integration tests
run: xvfb-run evo Tests/integration-test.lua
- name: Run benchmarks
run: evo .github/run-all-benchmarks.lua
- name: Prepare artifacts
run: cp evo evo-linux-x64
# GitHub adds a heading of their own, so remove the duplicate
- name: Generate CHANGELOG.MD
run: evo create-changelog.lua && tail -n +3 CHANGELOG.MD > CHANGELOG-GITHUB.MD && mv CHANGELOG-GITHUB.MD CHANGELOG.MD
- name: Publish new release
# Truly "continuous" releases may be overkill here, so better only release tagged versions
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: evo-linux-x64
body_path: CHANGELOG.MD
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}