forked from sahlberg/libnfs
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (90 loc) · 2.63 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
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
on:
push:
pull_request:
workflow_dispatch:
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- run: sudo apt install -y cmake
- run: mkdir build
- run: cmake -B build
- run: make --directory build
- run: sudo make --directory build install
Linux-Musl-QEMU:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- i386
- s390x # Test big-endian
- arm32v6
- arm32v7
steps:
- uses: actions/checkout@main
- name: Get the qemu container
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: ${{ matrix.platform }}
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine sh -c "apk add cmake make gcc libc-dev git; cp -r /host from-host; cd from-host; mkdir build; cmake -B build; make --directory build install"
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- run: brew install cmake
- run: mkdir build
- run: cmake -B build
- run: make --directory build install
build-windows:
name: Windows build
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Cmake configure
run: |
cmake -G "Visual Studio 17 2022" .
- name: Build (MSVC)
run: |
cmake --build .
BSDs:
runs-on: macos-latest
strategy:
matrix:
os:
- name: FreeBSD
version: '13.0'
pkginstall: pkg install -y cmake
- name: OpenBSD
version: 7.1
pkginstall: pkg_add cmake
name: ${{ matrix.os.name }} ${{ matrix.os.version }}
steps:
- uses: actions/checkout@main
- name: Test on ${{ matrix.os.name }}
uses: cross-platform-actions/[email protected]
with:
operating_system: ${{ matrix.os.name }}
version: ${{ matrix.os.version }}
shell: bash
run: |
sudo ${{ matrix.os.pkginstall }}
mkdir build
cmake -B build
cd build
make
sudo make install
Cygwin:
runs-on: windows-latest
steps:
- name: Set up Cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: make gcc-g++ bash cmake
- uses: actions/checkout@main
- shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd $GITHUB_WORKSPACE
mkdir build
cmake -B build
make --directory build install