-
-
Notifications
You must be signed in to change notification settings - Fork 67
144 lines (142 loc) · 4.34 KB
/
main.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
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Github CI
on: [push, pull_request]
#strategy:
# matrix:
# os: [ubuntu-14.04, ubuntu-18.04, ubuntu-latest]
jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
CONF_ARGS:
-
- --disable-wchar
- --enable-unsafe --enable-norm-compat
- --enable-debug --enable-unsafe --enable-norm-compat --enable-gcov
- --enable-debug --enable-unsafe --enable-norm-compat CFLAGS="-fsanitize=address"
- --disable-nullslack --enable-warn-dmax
- --disable-extensions CFLAGS="-march=native"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: sudo apt-get install doxygen libtext-diff-perl pkg-config
- run: sh build-aux/autogen.sh
- run: ./configure ${{ matrix.CONF_ARGS }}
- if: matrix.CONF_ARGS == '--disable-wchar'
name: make kernel module
run: make -f Makefile.kernel && make clean
- run: make
- run: make check-log
- if: ${{ contains(matrix.CONF_ARGS, '--enable-gcov') }}
name: Run make codecov if --enable-gcov
run: |
sudo apt-get install libdevel-cover-perl
make gcov
curl -s https://codecov.io/bash -o codecov_io.sh
chmod +x codecov_io.sh
bash codecov_io.sh
- if: matrix.CONF_ARGS == ''
name: Run make distcheck
run: |
sudo apt-get -y install doxygen wget perl
make distcheck
- if: matrix.CONF_ARGS == '' && startsWith(github.ref, 'refs/tags/')
name: Prep-Release
run: sha256sum safeclib-*.tar.* > dist.sha256
- if: matrix.CONF_ARGS == '' && startsWith(github.ref, 'refs/tags/')
name: Release
continue-on-error: true
uses: softprops/action-gh-release@v1
with:
body_path: dist.sha256
files: |
dist.sha256
safeclib-*.tar.*
macOS:
name: macOS
runs-on: macOS-latest
steps:
- name: init
run: brew install automake
- name: checkout
uses: actions/checkout@v2
- run: sh build-aux/autogen.sh
- run: ./configure --disable-hardening
- run: make V=1
- run: make check-log
#- run: make distcheck
mingw:
name: mingw
runs-on: windows-latest
env:
MSYS2_DIR: msys64
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
ARCH: win64
PLATFORM: x64
#PATH: "C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;%PATH%"
steps:
# see https://github.com/msys2/setup-msys2
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
path-type: minimal
update: true
install: >-
git
base-devel
coreutils
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-libtool
mingw-w64-x86_64-perl
libtool
autoconf-wrapper
automake-wrapper
zip
- run: reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /f /v DontShowUI /d 1
- run: git config --global core.autocrlf input
- name: checkout
uses: actions/checkout@v2
- shell: msys2 {0}
run: sh build-aux/autogen.sh
continue-on-error: true
- shell: msys2 {0}
run: ./configure
- shell: msys2 {0}
run: make V=1
- shell: msys2 {0}
run: make check-log
- shell: msys2 {0}
if: startsWith(github.ref, 'refs/tags/')
run: make pkg; sha256sum safeclib-*-x86_64-w64-mingw32.zip > mingw.sha256
- name: Release
uses: softprops/action-gh-release@fe9a9bd3295828558c7a3c004f23f3bf77d155b2
if: startsWith(github.ref, 'refs/tags/')
with:
append_body_path: mingw.sha256
files: |
mingw.sha256
safeclib-*-x86_64-w64-mingw32.zip
#- name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Draft Release ${{ github.ref }}
# draft: true
# prerelease: false
#- name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./configure.gz
# asset_name: configure.gz
# asset_content_type: application/gzip