forked from smartmontools/smartmontools
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.43 KB
/
macos.yml
File metadata and controls
44 lines (37 loc) · 1.43 KB
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
name: Build smartmontools on macOS
on: workflow_dispatch
jobs:
build-macos-binaries:
runs-on: macos-latest
steps:
- name: Install build tools
run: |
brew install automake
brew install libtool
- uses: actions/checkout@v4
with:
# Done above as the builtin would use a path for Windows git.
set-safe-directory: false
# Provide at least the commit log since last release for 'getversion.sh'.
# 'git clone --shallow-since=2025-04-29' would be sufficient but this is
# not supported by 'actions/checkout@v4'.
fetch-depth: 800
# Include (future) release tags for 'getversion.sh'
fetch-tags: true
- name: Set environment
run: src/getversion.sh -g >> $GITHUB_ENV
- run: ./autogen.sh
- name: Build (multiarch)
run: |
mkdir build && cd build &&
../configure --with-build-info='(GHA/macOS)' \
CFLAGS=-'arch arm64 -arch x86_64' CXXFLAGS='-arch arm64 -arch x86_64' \
SOURCE_DATE_EPOCH=$((SMARTMONTOOLS_GIT_REV_EPOCH + 1)) &&
make -j && make check &&
make bin-dist bin_distfile="smartmontools-macos-${SMARTMONTOOLS_GIT_VER_FNAME}.tar.gz"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: smartmontools-macos
path: build/smartmontools-macos-*.tar.gz
retention-days: 30