-
Notifications
You must be signed in to change notification settings - Fork 127
50 lines (46 loc) · 1.63 KB
/
build.yaml
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
name: Configure and Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Configure and Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13]
c_compiler: [gcc-10, clang]
steps:
- uses: actions/checkout@v4
- uses: ConorMacBride/install-package@v1
with:
brew: gettext autoconf automake libtool openssl
apt: build-essential autopoint automake autoconf libssl-dev libtool gettext libbsd-dev
- name: Install compiler
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: ${{ matrix.c_compiler }}
- name: Fix gettext and openssl on macOS
if: runner.os == 'macOS'
id: gettext
run: |
export GETTEXT_PATH="$(brew --prefix gettext)"
export OPENSSL_PATH="$(brew --prefix openssl)"
echo "GETTEXT_PATH=${GETTEXT_PATH}" >> $GITHUB_ENV
echo "LDFLAGS=-L${GETTEXT_PATH}/lib -L${OPENSSL_PATH}/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I${GETTEXT_PATH}/include -I${OPENSSL_PATH}/include" >> $GITHUB_ENV
echo "OPENSSL_PATH=${OPENSSL_PATH}" >> $GITHUB_ENV
echo "CRYPTO_CFLAGS=-I${OPENSSL_PATH}/include" >> $GITHUB_ENV
echo "CRYPTO_LIBS=-L${OPENSSL_PATH}/lib ${OPENSSL_PATH}/lib/libcrypto.3.dylib" >> $GITHUB_ENV
- name: autogen/configure
run: ./autogen.sh
- name: configure
run: ./configure CC="${{ steps.install_cc.outputs.cc }}" --prefix="${{ github.workspace }}/build"
- name: make
run: make all