forked from srcML/srcML
-
Notifications
You must be signed in to change notification settings - Fork 0
180 lines (154 loc) · 5.05 KB
/
Build.yml
File metadata and controls
180 lines (154 loc) · 5.05 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
name: Build
on: workflow_dispatch
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Cache Build
id: cache
uses: actions/cache@v2
with:
path: build
key: ${{ runner.os }}-client100
- shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update
sudo apt install curl zip g++ make ninja-build antlr libantlr-dev \
libxml2-dev libxml2-utils libxslt1-dev \
libarchive-dev libssl-dev libcurl4-openssl-dev \
cpio man file dpkg-dev
curl -L http://www.sdml.cs.kent.edu/build/srcML-1.0.0-Boost.tar.gz | \
sudo tar xz -C /usr/local/include
- shell: bash
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install ninja antlr2
curl -L http://www.sdml.cs.kent.edu/build/srcML-1.0.0-Boost.tar.gz | \
sudo tar xz -C /usr/local/include
- uses: microsoft/setup-msbuild@v1
if: ${{ matrix.os == 'windows-latest' }}
- shell: bash
if: ${{ !steps.cache.outputs.cache-hit }}
run: mkdir build
- shell: bash
if: ${{ matrix.os == 'windows-latest' }}
working-directory: build
continue-on-error: true
run: |
cmake ..
cmake --build . --config Release
cpack -G WIX -V
- shell: bash
=======
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Ubuntu
shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt install antlr libantlr-dev libantlr-java libarchive-dev \
libcurl4-openssl-dev libxml2-utils libxslt1-dev \
ninja-build
curl -L http://www.sdml.cs.kent.edu/build/srcML-1.0.0-Boost.tar.gz | \
sudo tar xz -C /usr/local/include
- name: Setup macOS
shell: bash
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install ninja antlr2 --display-times
curl -L http://www.sdml.cs.kent.edu/build/srcML-1.0.0-Boost.tar.gz | \
sudo tar xz -C /usr/local/include
- name: Setup Windows
uses: microsoft/setup-msbuild@v1
if: ${{ matrix.os == 'windows-latest' }}
- name: Create build directory
shell: bash
run: mkdir build
- name: CMake Setup on Windows
shell: bash
if: ${{ matrix.os == 'windows-latest' }}
working-directory: build
run: |
export UseMultiToolTask=true
cmake ..
- name: CMake Setup on Ubuntu/macOS
shell: bash
>>>>>>> upstream/issue1942
if: ${{ matrix.os != 'windows-latest' }}
working-directory: build
run: |
cmake .. -G Ninja
<<<<<<< HEAD
sudo cmake --build . --config Release --target install
- working-directory: build/dist
if: matrix.os == 'windows-latest'
run: msiexec /i D:\a\srcML\srcML\build\dist\srcML-Win.msi /quiet /norestart /L*V .\msi.log
- uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest'
with:
name: msi.log
path: build/dist/msi.log
- shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: build
run: |
ldconfig
srcml --version
srcml --text="int a;" -l C++
- shell: bash
if: matrix.os == 'macos-latest'
=======
- name: Build
shell: bash
working-directory: build
run: |
export UseMultiToolTask=true
cmake --build . --config Release
- name: Install on Windows
shell: bash
if: ${{ matrix.os == 'windows-latest' }}
working-directory: build
run: |
cmake --build . --config Release --target install
- name: Install on Ubuntu/macOS
shell: bash
if: ${{ matrix.os != 'windows-latest' }}
working-directory: build
run: |
sudo cmake --build . --config Release --target install
- name: Finish install for Ubuntu
shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: build
run: |
sudo ldconfig
- name: Set PATH for Windows
shell: bash
if: ${{ matrix.os == 'windows-latest' }}
working-directory: build
run: |
echo "/c/Program Files (x86)/srcML/bin" >> $GITHUB_PATH
- name: Run Installed srcml
shell: bash
>>>>>>> upstream/issue1942
working-directory: build
run: |
srcml --version
srcml --text="int a;" -l C++
<<<<<<< HEAD
- shell: bash
if: matrix.os == 'windows-latest'
working-directory: build
run: |
srcml.exe --version
srcml.exe --text="int a;" -l C++
=======
>>>>>>> upstream/issue1942