-
Notifications
You must be signed in to change notification settings - Fork 23
76 lines (74 loc) · 2.56 KB
/
windows.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
name: Windows
on:
push:
paths-ignore:
- '*.md'
- 'docker-k8s/**'
- 'Formula/**'
jobs:
installer:
name: Build Windows installer
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with: # For tools/get-version:
fetch-depth: 0
- name: Set up MSVC environment
uses: ilammy/msvc-dev-cmd@v1
- name: Remove GNU link (shadows MS link)
run: rm /usr/bin/link.exe
shell: bash
- name: Cache Rebar data
uses: actions/cache@v3
with:
path: ~/.cache/rebar3
key: ${{ runner.os }}-${{ hashFiles('rebar.config') }}
- name: Download Erlang/OTP and Rebar
uses: erlef/setup-beam@v1
with:
otp-version: '26.x'
rebar3-version: '3.x'
- name: Install LibYAML
run: vcpkg install libyaml:x64-windows-static-md
- name: Install OpenSSL
run: vcpkg install openssl:x64-windows-static-md
- name: Set compiler and linker flags
run: |
echo CFLAGS=/I"%VCPKG_INSTALLATION_ROOT%\installed\x64-windows-static-md\include" /MD >> %GITHUB_ENV%
echo LDFLAGS=/LIBPATH:"%VCPKG_INSTALLATION_ROOT%\installed\x64-windows-static-md\lib" >> %GITHUB_ENV%
shell: cmd
- name: Compile installer
run: windows/make-installer
shell: bash
- name: Install and start eturnal
run: ./eturnal-$(tools/get-version)-x64 //SP- //VERYSILENT //SUPPRESSMSGBOXES
shell: bash
timeout-minutes: 10
- name: Restart eturnal
run: call "%ProgramFiles%\\eturnal\\bin\\eturnal" restart
shell: cmd
- name: Analyze cross references
run: rebar3 xref
- name: Perform static code analysis
run: rebar3 dialyzer
# The Common Test suite performs actual TURN tests, which can fail due to
# Hyper-V reserving random UDP port ranges. The proper fix would be the
# admin reserving a range for eturnal as described here:
#
# https://stackoverflow.com/a/62061654
#
# However, that's not possible within a GitHub Actions runner. As a
# workaround, retry running the Common Test once on failure:
- name: Run black-box tests (CT)
run: rebar3 ct || rebar3 ct
shell: bash
- name: Run white-box tests (EUnit)
run: rebar3 eunit
- name: Check test coverage
run: rebar3 cover
- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: eturnal-installer
path: eturnal-*.exe