-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (95 loc) · 3.08 KB
/
Copy pathbuild.yml
File metadata and controls
118 lines (95 loc) · 3.08 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
name: build
on: [push, workflow_dispatch]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- { target: 'Linux-x64', os: 'ubuntu-latest', shell: 'bash' }
- { target: 'Windows-x64', os: 'windows-latest', sys: 'mingw64', pkgpref: 'mingw-w64-x86_64', shell: 'msys2 {0}' }
- { target: 'Windows-x86', os: 'windows-latest', sys: 'mingw32', pkgpref: 'mingw-w64-i686', shell: 'msys2 {0}' }
- { target: 'MacOS', os: 'macos-latest', shell: 'bash' }
runs-on: ${{matrix.os}}
defaults:
run:
shell: ${{matrix.shell}}
steps:
- name: checkout
uses: actions/checkout@master
with:
submodules: recursive
- name: setup-linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install --fix-missing xvfb libglu1-mesa-dev freeglut3-dev mesa-common-dev
- name: setup-msys
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
#update: true
install: git make ${{matrix.pkgpref}}-gcc zip unzip
- name: setup-macos
if: matrix.os == 'macos-latest'
run: |
- name: prepare-linux
if: matrix.os == 'ubuntu-latest'
run: |
echo "LDPF_LDD_TOOL=/usr/bin/ldd" >> $GITHUB_ENV
- name: prepare-msys
if: matrix.os == 'windows-latest'
run: |
export PATH="/${{matrix.sys}}/bin"
echo "PATH=$PATH" >> $GITHUB_ENV
echo "MSYSTEM=$MSYSTEM"
echo "PATH=$PATH"
type gcc
gcc -v
- name: prepare-macos
if: matrix.os == 'macos-latest'
run: |
echo "LDPF_LDD_TOOL=/usr/bin/otool -L" >> $GITHUB_ENV
- name: print-env
run: |
set
- name: download
if: matrix.os == 'windows-latest' || matrix.os == 'macos-latest'
run: |
make download-components
- name: build
run: |
make -j8
- name: display-size
run: |
cd bin
du -sh *
- name: display-dynamic-libs
run: |
cd bin
echo "---------------------------------"
export PATH=.
for i in `/usr/bin/find . -type f`
do echo "-- $i ---------------------------"
$LDPF_LDD_TOOL $i || true
done
echo "---------------------------------"
- name: display-symbols
run: |
cd bin
echo "---------------------------------"
for i in `/usr/bin/find . -type f`
do echo "-- $i ---------------------------"
/bin/nm -Dg $i || true
done
echo "---------------------------------"
- name: zip
run: |
mkdir zip
mv bin zip/LDPF-Examples-${{matrix.target}}
- name: upload-artifact
uses: actions/upload-artifact@v2
with:
name: LDPF-Examples-${{matrix.target}}
path: zip