Skip to content

Avoid the UDP stack for local communication #267

Avoid the UDP stack for local communication

Avoid the UDP stack for local communication #267

Workflow file for this run

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