-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.93 KB
/
build.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
name: Build ifswp2cm
on:
workflow_dispatch:
push:
# branches: [ "main" ]
tags: ["v*"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
- name: Check cmake version
run: cmake --version
- name: Setup build tools
run: |
sudo apt -y update
sudo apt -y install ninja-build mingw-w64
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
- name: Build ifswp2cm
run: |
cmake -G Ninja -B build_32_release -DCMAKE_INSTALL_PREFIX=out_32_release -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
cmake --build build_32_release --config Release --target install
cmake -G Ninja -B build_64_release -DCMAKE_INSTALL_PREFIX=out_64_release -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++
cmake --build build_64_release --config Release --target install
- name: Archive
run: |
cp ./ext/libwebp2/LICENSE ./LICENSE_libwebp2
mv ./LICENSE LICENSE_ifswp2cm
zip ifswp2cm -j ./build_32_release/ifswp2cm.spi ./build_64_release/ifswp2cm.sph ./LICENSE*
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: Release ${{ github.ref_name }}
body: |
## Release notes
files: ifswp2cm.zip