Skip to content

Commit

Permalink
GHA: Simplify macOS builds
Browse files Browse the repository at this point in the history
Reduce redundant configuration.

Change-Id: Ie922ce67685228eb7043749a7f1a61a33be678d2
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Arne Schwabe <[email protected]>
Acked-by: Yuriy Darnobyt <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg29552.html
Signed-off-by: Gert Doering <[email protected]>
  • Loading branch information
flichtenheld authored and cron2 committed Oct 16, 2024
1 parent 6f74d39 commit 33a700d
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ssllib: [ openssl11, openssl3, libressl]
build: [ normal, asan ]
ssllib: [[email protected], openssl@3, libressl]
build: [normal, asan]
os: [macos-13, macos-14, macos-15]
include:
# macos14 and newer runners use ARM CPUs and homebrew uses /opt/homebrew/
# on ARM instead of /usr/local/
- os: macos-13
homebrew: /usr/local/opt
- os: macos-14
homebrew: /opt/homebrew/opt
- os: macos-15
homebrew: /opt/homebrew/opt
- build: asan
cflags: "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
ldflags: -fsanitize=address,undefined -fno-sanitize-recover=all
Expand All @@ -232,35 +224,30 @@ jobs:
cflags: "-O2 -g"
ldflags: ""
configureflags: ""
- ssllib: openssl11
libdir: [email protected]
configuressllib: ""
- ssllib: openssl3
libdir: openssl@3
configuressllib: ""
- ssllib: libressl
libdir: libressl
configuressllib: "--with-openssl-engine=no"

runs-on: ${{matrix.os}}
name: "${{matrix.os}} - ${{matrix.libdir}} - ${{matrix.build}}"
name: "${{matrix.os}} - ${{matrix.ssllib}} - ${{matrix.build}}"
env:
CFLAGS: ${{ matrix.cflags }}
LDFLAGS: ${{ matrix.ldflags }}
OPENSSL_CFLAGS: "-I${{matrix.homebrew}}/${{matrix.libdir}}/include"
OPENSSL_LIBS: "-L${{matrix.homebrew}}/${{matrix.libdir}}/lib -lcrypto -lssl"
LZO_CFLAGS: "-I${{matrix.homebrew}}/lzo/include"
LZO_LIBS: "-L${{matrix.homebrew}}/lzo/lib -llzo2"
UBSAN_OPTIONS: print_stacktrace=1
steps:
- name: Install dependencies
run: brew install [email protected] openssl@3 lzo lz4 man2html cmocka libtool automake autoconf libressl
run: brew install ${{matrix.ssllib}} lzo lz4 man2html cmocka libtool automake autoconf
- name: Checkout OpenVPN
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set environment
run: |
cat >>$GITHUB_ENV <<EOF;
OPENSSL_CFLAGS=-I$(brew --prefix ${{matrix.ssllib}})/include
OPENSSL_LIBS=-L$(brew --prefix ${{matrix.ssllib}})/lib -lcrypto -lssl
LZO_CFLAGS=-I$(brew --prefix lzo)/include
LZO_LIBS=-L$(brew --prefix lzo)/lib -llzo2
EOF
- name: autoconf
run: autoreconf -fvi
- name: configure
run: ./configure --enable-werror ${{matrix.configureflags}} ${{matrix.configuressllib}}
run: ./configure --enable-werror ${{matrix.configureflags}}
- name: make all
run: make -j4
- name: configure checks
Expand Down

0 comments on commit 33a700d

Please sign in to comment.