-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (64 loc) · 2.61 KB
/
ci-windows.yaml
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
name: Build and Release (Windows)
on:
push:
branches:
- main
pull_request:
branches:
- main
create:
# Any branch or tag
jobs:
build:
name: Build for Windows
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: "0" # Required so that git describe actually works (and we can embed the version tag)
- name: Set up MSYS2 environment
uses: msys2/setup-msys2@v2
with:
install: git make mingw-w64-x86_64-gcc ninja mingw-w64-x86_64-cmake
- name: Build luajit (via MSYS2)
run: deps/luajit-windowsbuild.sh && ls ninjabuild-windows
- name: Build llhttp (via MSYS2)
run: deps/llhttp-windowsbuild.sh && ls ninjabuild-windows
- name: Build openssl (via MSYS2)
run: deps/openssl-windowsbuild.sh && ls ninjabuild-windows
- name: Build lua-openssl (via MSYS2)
run: deps/luaopenssl-windowsbuild.sh && ls ninjabuild-windows
- name: Build luv and libuv (via MSYS2)
run: deps/luv-windowsbuild.sh && ls ninjabuild-windows
- name: Build zlib (via MSYS2)
run: deps/zlib-windowsbuild.sh && ls ninjabuild-windows
- name: Build pcre2 (via MSYS2)
run: deps/pcre-windowsbuild.sh && ls ninjabuild-windows
- name: Build runtime
run: ls && ./windowsbuild.cmd && ls ninjabuild-windows && cp ninjabuild-windows/evo.exe . && ls
# These should be integrated with the unit (or acceptance) test steps, but that's a future concern
- name: Run legacy tests
run: ./run-legacy-tests.cmd
- name: Run unit tests
run: ./evo test.lua
- name: Run examples # These examples are synced with the documentation and must always work
run: ./evo run-examples.lua
- name: Run acceptance tests
run: ./evo scenarios.lua
# 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.exe
body_path: CHANGELOG.MD
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}