-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 1.38 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
name: build
on:
push:
branches: ["main"]
paths-ignore:
- '**/*.md'
pull_request:
branches: ["main"]
paths-ignore:
- '**/*.md'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Build on Ubuntu
if: runner.os == 'Linux'
run: make
- name: Upload teapot binary
if: runner.os == 'Linux'
uses: actions/upload-artifact@v2
with:
name: teapot-binary
path: ./teapot
- name: Setup Build Environment on Windows
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v1
with:
msbuild-version: 'latest'
- name: Build on Windows with MSBuild
if: runner.os == 'Windows'
run: |
msbuild teapot.sln /p:Configuration=Release /p:Platform="x64" /p:CXXStandard=20 /p:LanguageStandard=C++20
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download teapot binary
uses: actions/download-artifact@v2
with:
name: teapot-binary
path: .
- name: Set execute permissions on teapot
run: chmod +x ./teapot
- name: Run endpoint tests
run: |
./teapot 8888 &
sleep 5
./tests/e2e_tests.sh