-
Notifications
You must be signed in to change notification settings - Fork 620
90 lines (76 loc) · 2.96 KB
/
build.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
name: CI
on: [push, pull_request]
jobs:
build-and-test-ubuntu:
#if: false # Temporarily disable
name: Build And Test Ubuntu
runs-on: ubuntu-latest
env:
CI_BUILD: 1
IMAGE: ubuntu
IMAGE_TAG: latest
steps:
- uses: actions/checkout@main
# Note only alpine needs "preinstall" step
- name: Update packages
run: sudo -E bash .github/update-packages.sh
- name: Install dependencies
run: |
sudo -E bash .github/install.sh
sudo -E bash .github/install-post.sh
- name: Build and run tests
run: bash .github/build.sh
# Trigger testing of more linux flavors
- name: Trigger linux flavors build
uses: peter-evans/repository-dispatch@v2
with:
event-type: build-linux-flavors
build-and-test-windows:
#if: false # Temporarily disable
name: Build And Test Windows
runs-on: windows-latest
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- uses: actions/checkout@main
- uses: lukka/get-cmake@latest
# Setup MSVC command prompt environment vars.
# We must do this before sedtting up our local vcpkg,
# Because it will set VCPKG_ROOT to point to some global
# install of vcpkg, and we don't want that
- uses: ilammy/msvc-dev-cmd@v1
- name: Restore artifacts, setup vcpkg
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: e809a42f87565e803b2178a0c11263f462d1800a
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgJsonGlob: vcpkg.json
runVcpkgInstall: false
- name: vcpkg check / install dependencies
working-directory: '${{ github.workspace }}'
run: '"${{env.VCPKG_ROOT}}\\vcpkg" install --triplet=x64-windows'
shell: cmd
- name: Install dependencies and generate project files
run: |
mkdir build
cd build
cmake -S .. -G Ninja -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
shell: cmd
# Mark all directories as safe so checkouts performed in CMakeLists.txt don't cause "unsafe repository" errors.
# See https://github.com/actions/checkout/issues/766
- name: Configure Git
run: git config --global --add safe.directory '*'
shell: cmd
- name: Build projects
working-directory: '${{ github.workspace }}/build'
run: ninja
shell: cmd
- name: Test crypto
working-directory: '${{ github.workspace }}/build/bin'
run: test_crypto.exe
shell: cmd
- name: Test connection
working-directory: '${{ github.workspace }}/build/bin'
#run: test_connection.exe suite-quick # Loopback throughput test not performing on github hosted runners for some reason
run: test_connection.exe identity quick lane_quick_queueanddrain lane_quick_priority_and_background
shell: cmd