-
Notifications
You must be signed in to change notification settings - Fork 94
145 lines (116 loc) · 4.37 KB
/
Copy pathCI_build.yml
File metadata and controls
145 lines (116 loc) · 4.37 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
name: CI_build
on: [push, pull_request]
jobs:
build_windows:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
build_configuration: [Release, Debug]
build_platform: [x64, ARM64, Win32]
steps:
- uses: actions/checkout@v7
- name: generate cmake
run: |
# avoid issue for x64 build to find false openssl by libssh
Remove-Item -Recurse -Force 'C:\Program Files\OpenSSL'
mkdir _build
cd _build
cmake -G "Visual Studio 17 2022" -A ${{ matrix.build_platform }} -T "v143" ..
- name: build cmake
run: |
cd _build
cmake --build . --config ${{ matrix.build_configuration }} --target package
- name: Archive artifacts for x64 CPack
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
uses: actions/upload-artifact@v7
with:
name: plugin_dll_x64
path: _build\NppFTP-0.30.22-win64.zip
- name: Archive artifacts for Win32 CPack
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release'
uses: actions/upload-artifact@v7
with:
name: plugin_dll_x86
path: _build\NppFTP-0.30.22-win32.zip
- name: Rename and copy artifacts from ARM64 CPack
if: matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
run: |
copy _build\NppFTP-0.30.22-win64.zip .\NppFTP-arm64.zip
- name: Archive artifacts for ARM64 CPack
if: matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
uses: actions/upload-artifact@v7
with:
name: NppFTP-arm64.zip
path: NppFTP-arm64.zip
- name: Release for x64
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/') && matrix.build_platform == 'ARM64'
with:
files: NppFTP-arm64.zip
build_linux:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
build_platform: ["64", "32"]
steps:
- uses: actions/checkout@v7
- name: Install packages via apt
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y mingw-w64 python3 perl cmake zip
(for alt in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do sudo update-alternatives --set $alt /usr/bin/$alt-posix; done);
- name: build make mingw
run: make -f Makefile.mingw BITS=${{ matrix.build_platform }}
- name: Archive artifacts for x86
if: matrix.build_platform == '32'
uses: actions/upload-artifact@v7
with:
name: NppFTP-x86.zip
path: NppFTP-x86.zip
- name: Archive artifacts for x64
if: matrix.build_platform == '64'
uses: actions/upload-artifact@v7
with:
name: NppFTP-x64.zip
path: NppFTP-x64.zip
- name: Release for x86
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/') && matrix.build_platform == '32'
with:
files: NppFTP-x86.zip
- name: Release for x64
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/') && matrix.build_platform == '64'
with:
files: NppFTP-x64.zip
build_linux_cmake:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
build_configuration: [Release, Debug]
build_platform: ["Unix Makefiles"]
steps:
- uses: actions/checkout@v7
- name: Install packages via apt
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y mingw-w64 python3 perl cmake zip
(for alt in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do sudo update-alternatives --set $alt /usr/bin/$alt-posix; done);
- name: generate cmake
run: |
mkdir _build
cd _build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake_toolchain-mingw-w64-ubuntu.cmake -G "${{ matrix.build_platform }}" ..
- name: build cmake
run: |
cd _build
cmake --build . --config ${{ matrix.build_configuration }} --target package
- name: Archive artifacts for x64 CPack
if: matrix.build_configuration == 'Release'
uses: actions/upload-artifact@v7
with:
name: plugin_dll_x64_linux
path: _build/NppFTP-0.30.22-win64.zip