forked from bunder/qpakman
-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (101 loc) · 3.07 KB
/
create-artifacts.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
name: build
on: [push, pull_request]
jobs:
linux_build:
runs-on: ubuntu-latest
env:
CXX: g++
steps:
- name: Update Local Aptitude Repos
run: |
sudo dpkg --add-architecture i386
sudo apt update
- name: Install CMake
run: |
sudo apt install -y cmake
- name: Install 32-bit libraries
run: |
sudo apt install -y g++-multilib zlib1g:i386 libsnappy-dev:i386 liblz4-1:i386
- name: Checkout
uses: actions/checkout@v4
- name: Build 64 bit
run: |
mkdir build-lin64 && cd build-lin64
cmake ../
cmake --build .
cd ../
- name: Archive qpakman Linux64
uses: actions/upload-artifact@v4
with:
name: qpakman-linux64
path: ./build-lin64/qpakman
- name: Build 32 bit
run: |
mkdir build-lin32 && cd build-lin32
cmake -E env CXXFLAGS="-m32" cmake ../
cmake ../
cmake --build .
cd ../
- name: Archive qpakman Linux32
uses: actions/upload-artifact@v4
with:
name: qpakman-linux32
path: ./build-lin32/qpakman
macos_build:
runs-on: macos-13
env:
CXX: clang++
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
mkdir build-macos && cd build-macos
cmake ../
cmake --build .
- name: Archive qpakman macOS
uses: actions/upload-artifact@v4
with:
name: qpakman-macos
path: ./build-macos/qpakman
windows_build:
runs-on: windows-2019
env:
VCPKG_VERSION: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
vcpkg_packages: zlib
strategy:
matrix:
config:
- {
arch: x86,
generator: "-G'Visual Studio 16 2019' -A Win32",
vcpkg_triplet: x86-windows-static,
artifact_name: windows32
}
- {
arch: x64,
generator: "-G'Visual Studio 16 2019' -A x64",
vcpkg_triplet: x64-windows-static,
artifact_name: windows64
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run vcpkg
uses: lukka/run-vcpkg@v7
with:
vcpkgArguments: zlib
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
- name: Build
run: |
mkdir build-${{ matrix.config.vcpkg_triplet }} && cd build-${{ matrix.config.vcpkg_triplet }}
cmake ${{matrix.config.generator}} -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="${{ matrix.config.vcpkg_triplet }}" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ../
cmake --build . --config Release
- name: Archive qpakman Windows
uses: actions/upload-artifact@v4
with:
name: qpakman-${{ matrix.config.artifact_name }}
path: ./build-${{ matrix.config.vcpkg_triplet }}/Release/qpakman.exe