Skip to content

Configured artifacts for OS X CI #18

Configured artifacts for OS X CI

Configured artifacts for OS X CI #18

Workflow file for this run

name: Build (OS X)
on:
push:
pull_request:
workflow_dispatch:
jobs:
build_osx:
strategy:
# Don't cancel all builds when one fails
fail-fast: false
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies (macOS)
run: brew install fftw
- name: List available FFTW (macOS)
run: brew list fftw --verbose
- name: Clone libhackrf
uses: actions/checkout@v4
with:
repository: greatscottgadgets/hackrf
path: hackrf
# Build libhackrf ONLY
- name: Create Build Environment (libhackrf)
run: |
cd hackrf
cmake -E make_directory ${{github.workspace}}/hackrf/host/libhackrf/build
echo "HACKRF_HOME=$PWD" >> $GITHUB_ENV
- name: Configure CMake (libhackrf)
working-directory: ${{github.workspace}}/hackrf/host/libhackrf/build
run: cmake $GITHUB_WORKSPACE/hackrf/host/libhackrf/ -DCMAKE_BUILD_TYPE=Release
- name: Build (libhackrf)
working-directory: ${{github.workspace}}/hackrf/host/libhackrf/build
run: cmake --build . --config Release
- name: Install (libhackrf)
working-directory: ${{github.workspace}}/hackrf/host/libhackrf/build
run: |
sudo cmake --install . --config Release --prefix=$GITHUB_WORKSPACE/install
echo "HACKRF_INSTALL_DIR=$GITHUB_WORKSPACE/install" >> $GITHUB_ENV
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE/ -DCMAKE_BUILD_TYPE=Release -DLIBHACKRF_DIR=$HACKRF_INSTALL_DIR -DLIBHACKRF_LIBRARIES=$HACKRF_INSTALL_DIR/lib/libhackrf.dylib -DLIBHACKRF_INCLUDE_DIR=$HACKRF_INSTALL_DIR/include/libhackrf
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config Release
- name: Install
working-directory: ${{github.workspace}}/build
run: |
sudo cmake --install . --config Release --prefix=$GITHUB_WORKSPACE/install
- name: List current working directory
run: ls -lhrt
# Publish the contents of install/bin
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: hackrf_sweeper-osx
path: ${{github.workspace}}/install/*