-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (70 loc) · 2.63 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
90
91
name: Build
on: push
jobs:
linux_build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install
run: |
sudo apt-get update -y
sudo apt-get install -y gcc make cmake libx11-dev libxrender-dev libfreetype6-dev libxft-dev
- name: Build with GCC (check)
run: gcc ./src/main.c ./src/dtan.c ./src/dtan_linux.c -o dtan -lX11 -lXrender -lXft -lm -I/usr/include/freetype2
- name: Build with CMake
run: mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build .
- name: Archive
uses: actions/upload-artifact@v2
with:
name: linux_bin
path: ./build/bin/
- name: Test
run: |
./build/bin/dtansp "/sample/path"
# Pending
# run: |
# ./build/bin/dtan " test "
# ./build/bin/dtansp "/sample/path"
macos_build:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build with Clang (check)
run: clang ./src/main.c ./src/dtan.c ./src/dtan_macos.m -o dtan -fobjc-arc -x objective-c -Wl,-framework,Cocoa
- name: Build with CMake
run: mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build .
- name: Archive
uses: actions/upload-artifact@v2
with:
name: macos_bin
path: ./build/bin/
- name: Test
run: |
./build/bin/dtan " test "
./build/bin/dtansp "/sample/path"
windows_build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build with CL (check)
run: |
${VS_INST_PATH} = vswhere.exe -latest -property installationPath
Import-Module ${VS_INST_PATH}/Common7/Tools/Microsoft.VisualStudio.DevShell.dll
Enter-VsDevShell -VsInstallPath ${VS_INST_PATH} -SkipAutomaticLocation -DevCmdArguments '-arch=x64 -no_logo'
CL .\src\main.c .\src\dtan.c .\src\dtan_windows.c gdi32.lib /link /OUT:dtan.exe /SUBSYSTEM:WINDOWS /entry:mainCRTStartup
- name: Build with GCC (check)
run: gcc ./src/main.c ./src/dtan.c ./src/dtan_windows.c -o dtan.exe -lgdi32 "-Wl,-subsystem,windows"
- name: Build with CMake
run: mkdir -p build && cd build && cmake .. && cmake --build . --config Release
- name: Archive
uses: actions/upload-artifact@v2
with:
name: windows_bin
path: ./build/bin/
- name: Test
run: |
.\build\bin\Release\dtan.exe " test "
.\build\bin\Release\dtansp.exe "/sample/path"