-
Notifications
You must be signed in to change notification settings - Fork 5
131 lines (109 loc) · 3.38 KB
/
compilation.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI-compile
on:
push:
pull_request:
jobs:
build-win:
name: PMAP windows compilation
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup msbuild
uses: microsoft/setup-msbuild@v2
- name: Build
run: msbuild /p:PlatformToolset=v142 /p:Configuration=Release
- uses: actions/upload-artifact@v4
with:
name: PMAP-wincli
path: Release/PMAP.exe
- uses: actions/upload-artifact@v4
with:
name: PMAP-wingui
path: Release/PMAP-win.exe
build-macos:
name: PMAP macos compilation
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: |
cd PMAP-unix
make
tar -zcvf PMAP-macos.tar.gz pmap
- name: Build id
run: |
cd PMAP-unix
make clean
make ID_MANAGEMENT=1
tar -zcvf PMAP-macos-id.tar.gz pmap
- uses: actions/upload-artifact@v4
with:
name: PMAP-macos
path: PMAP-unix/PMAP-macos.tar.gz
- uses: actions/upload-artifact@v4
with:
name: PMAP-macos-id
path: PMAP-unix/PMAP-macos-id.tar.gz
build-linux:
name: PMAP linux compilation
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: |
cd PMAP-unix
make
tar -zcvf PMAP-linux.tar.gz pmap
- name: Build id
run: |
cd PMAP-unix
make clean
make ID_MANAGEMENT=1
tar -zcvf PMAP-linux-id.tar.gz pmap
- uses: actions/upload-artifact@v4
with:
name: PMAP-linux
path: PMAP-unix/PMAP-linux.tar.gz
- uses: actions/upload-artifact@v4
with:
name: PMAP-linux-id
path: PMAP-unix/PMAP-linux-id.tar.gz
create-release:
name: Create release
runs-on: ubuntu-latest
needs: [build-win, build-macos, build-linux]
steps:
- uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- name: Create release for master/main
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Latest development build"
files: |
./PMAP-wincli/PMAP.exe
./PMAP-wingui/PMAP-win.exe
./PMAP-macos/PMAP-macos.tar.gz
./PMAP-macos-id/PMAP-macos-id.tar.gz
./PMAP-linux/PMAP-linux.tar.gz
./PMAP-linux-id/PMAP-linux-id.tar.gz
- name: Create release for tagged versions
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: "${{ contains(github.ref, '-rc') }}"
title: PMAP-${{ github.ref }}
files: |
./release/win/PMAP.exe
./release/win/PMAP-win.exe
./release/macos/PMAP-macos.tar.gz
./release/macos/PMAP-macos-id.tar.gz
./release/linux/PMAP-linux.tar.gz
./release/linux/PMAP-linux-id.tar.gz