-
Notifications
You must be signed in to change notification settings - Fork 202
84 lines (71 loc) · 2.38 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
name: Build and Test
on:
push:
branches:
- master
- 2.4.x
pull_request:
branches:
- master
- 2.4.x
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: show Ubuntu version
run: cat /etc/os-release | grep PRETTY_NAME | awk -F '=' '{print $2}'
- name: update build environment
run: sudo apt-get update --fix-missing -y && sudo apt-get upgrade --fix-missing -y
- name: install prerequisites
run: sudo apt-get install -y avahi-daemon libavahi-client-dev libssl-dev libpam-dev libusb-1.0-0-dev zlib1g-dev
- name: configure
env:
CC: /usr/bin/gcc
run: ./configure --enable-debug --enable-maintainer
- name: make
run: make
- name: test
run: make test || cat test/error_log*
build-linux-i386:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: show Ubuntu version
run: cat /etc/os-release | grep PRETTY_NAME | awk -F '=' '{print $2}'
- name: setup multiarch for i386
run: sudo dpkg --add-architecture i386
- name: update build environment
run: sudo apt-get update --fix-missing -y
- name: install prerequisites
run: sudo apt-get install -y avahi-daemon libavahi-client-dev libavahi-client-dev:i386 libgnutls28-dev libgnutls28-dev:i386 libpam-dev libpam-dev:i386 libusb-1.0-0-dev libusb-1.0-0-dev:i386 zlib1g-dev zlib1g-dev:i386 crossbuild-essential-i386 libgcc-s1:i386 libstdc++6:i386
- name: configure
env:
CC: /usr/bin/i686-linux-gnu-gcc
CXX: /usr/bin/i686-linux-gnu-g++
run: ./configure --enable-debug --enable-maintainer --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-tls=gnutls
- name: make
run: make
- name: test
run: make test || cat test/error_log*
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: ./configure --enable-debug --enable-maintainer --enable-sanitizer
- name: make
run: make
- name: test
run: make test || cat test/error_log*
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: setup-msbuild
uses: microsoft/[email protected]
- name: nuget restore
run: cd vcnet; nuget restore cups.sln
- name: msbuild
run: cd vcnet; msbuild cups.sln