Skip to content

Commit

Permalink
Merge remote-tracking branch 'moe/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
randomlogin committed Sep 19, 2024
2 parents 9a06733 + a572981 commit 0a60276
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 23 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/build-macos-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build and Package - MacOS (arm)

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build-hnsd:
runs-on: macos-latest

steps:
- name: Checkout hnsd repository
uses: actions/checkout@v4
with:
repository: 'handshake-org/hnsd'
ref: master

- name: Install dependencies
run: brew install automake autoconf libtool unbound

- name: Build hnsd
run: |
./autogen.sh && ./configure --with-unbound=$(brew --prefix) && make
ls -l
- name: Store hnsd binary
uses: actions/upload-artifact@v4
with:
name: hnsd-bin-${{runner.os}}
path: ./hnsd
if-no-files-found: error

build-fingertip:
needs: build-hnsd
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Install dependencies
run: brew install dylibbundler getdns


- name: Set environment variables
run: |
export BREW_PREFIX=$(brew --prefix getdns)
echo "BREW_PREFIX=$BREW_PREFIX" >> $GITHUB_ENV
echo $GITHUB_ENV
- name: Download hnsd binary
uses: actions/download-artifact@v4
with:
name: hnsd-bin-${{runner.os}}
path: builds/macos/Fingertip.app/Contents/MacOS

- name: Build fingertip
run: |
source $GITHUB_ENV
export CGO_CFLAGS="-I$BREW_PREFIX/include"
export CGO_LDFLAGS="-L$BREW_PREFIX/lib -lgetdns"
echo $CGO_CFLAGS
echo $CGO_LDFLAGS
chmod +x builds/macos/Fingertip.app/Contents/MacOS/hnsd
./builds/macos/build.sh
ls -l builds/macos
ls -l builds/macos/Fingertip.app/Contents/MacOS
ls -l builds/macos/Fingertip.app/Contents/Frameworks
- name: Create DMG
working-directory: ./builds/macos
run: |
hdiutil create -format UDZO -srcfolder ./Fingertip.app ./Fingertip.dmg
ls -l
- name: Store fingertip binary
uses: actions/upload-artifact@v4
with:
name: fingertip-bin-${{runner.os}}
path: ./builds/macos/Fingertip.app/Contents/MacOS/fingertip
if-no-files-found: error

- name: Store fingertip dmg
uses: actions/upload-artifact@v4
with:
name: fingertip-dmg-${{runner.os}}
path: ./builds/macos/Fingertip.dmg
if-no-files-found: error
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Package - MacOS (reusable)
name: Build and Package - MacOS (x86-64)

on:
push:
Expand All @@ -11,7 +11,7 @@ on:

jobs:
build-hnsd:
runs-on: macos-latest
runs-on: macos-13

steps:
- name: Checkout hnsd repository
Expand All @@ -37,7 +37,7 @@ jobs:

build-fingertip:
needs: build-hnsd
runs-on: macos-latest
runs-on: macos-13

steps:
- name: Checkout repository
Expand Down Expand Up @@ -77,9 +77,7 @@ jobs:
echo $CGO_CFLAGS
echo $CGO_LDFLAGS
chmod +x builds/macos/Fingertip.app/Contents/MacOS/hnsd
dylibbundler -od -b -x builds/macos/Fingertip.app/Contents/MacOS/hnsd -d builds/macos/Fingertip.app/Contents/Frameworks -p @executable_path/../Frameworks/
./builds/macos/build.sh
dylibbundler -od -b -x builds/macos/Fingertip.app/Contents/MacOS/fingertip -d builds/macos/Fingertip.app/Contents/Frameworks -p @executable_path/../Frameworks/
./builds/macos/build.sh
ls -l builds/macos
ls -l builds/macos/Fingertip.app/Contents/MacOS
ls -l builds/macos/Fingertip.app/Contents/Frameworks
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/build-macos.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ bash builds/linux/create_appimage.sh

### Windows

Due to the [difference](https://github.com/handshake-org/hnsd/issues/128) in hnsd behaviour on Windows and other platforms (and overall complexity of building for windows),
Windows is not supported. This may change in future.
Due to the [difference](https://github.com/handshake-org/hnsd/issues/128) in hnsd behaviour on Windows and other platforms (and overall complexity of building for windows), stateless DANE is not supported on Windows.
The version from the [v0.0.3 release](https://github.com/imperviousinc/fingertip/releases/tag/v0.0.3) should be used for usual DANE.


## Credits
Expand Down

0 comments on commit 0a60276

Please sign in to comment.