Skip to content

Commit

Permalink
ci: disable macos builds until we have test hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
HUN220 committed Feb 6, 2024
1 parent f8b6b0c commit 1dec641
Showing 1 changed file with 86 additions and 84 deletions.
170 changes: 86 additions & 84 deletions .github/workflows/build-fracg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build FracG

on:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand All @@ -15,85 +15,87 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -yq build-essential libgdal-dev libboost-all-dev liblapack-dev libblas-dev libgsl-dev libgmsh-dev libarmadillo-dev

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
# Artifact name
name: fracg_linux_amd64
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/build/FracG

macos-x86_64-build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies (MacOS x86_64)
run: brew install gdal boost lapack gsl gmsh armadillo libomp

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES="x86_64"

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
# Artifact name
name: fracg_macos-x86_64
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/build/FracG

macos-arm64-build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies (MacOS arm64)
run: |
mkdir -p ${{github.workspace}}/arm-target/bin
mkdir -p ${{github.workspace}}/arm-target/brew-cache
export PATH="${{github.workspace}}/arm-target/bin:$PATH"
cd ${{github.workspace}}/arm-target
mkdir arm-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm-homebrew
ln -s ${{github.workspace}}/arm-target/arm-homebrew/bin/brew ${{github.workspace}}/arm-target/bin/arm-brew
export HOMEBREW_CACHE=${{github.workspace}}/arm-target/brew-cache
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
arm-brew fetch --deps --bottle-tag=arm64_big_sur gdal boost lapack gsl gmsh armadillo libomp |\
grep -E "(Downloaded to:|Already downloaded:)" |\
grep -v pkg-config |\
awk '{ print $3 }' |\
xargs -n 1 arm-brew install --ignore-dependencies --force-bottle
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_PREFIX_PATH="arm-brew --prefix"

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
# Artifact name
name: fracg_macos-arm64
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/build/FracG
- uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -yq build-essential libgdal-dev libboost-all-dev liblapack-dev libblas-dev libgsl-dev libgmsh-dev libarmadillo-dev

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
# Artifact name
name: fracg_linux_amd64
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/build/FracG

# FIXME: Disable macos-x86_64 builds until we have hardware to test them on
# macos-x86_64-build:
# runs-on: macos-latest

# steps:
# - uses: actions/checkout@v3

# - name: Install dependencies (MacOS x86_64)
# run: brew install gdal boost lapack gsl gmsh armadillo libomp

# - name: Configure CMake
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES="x86_64"

# - name: Build
# # Build your program with the given configuration
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v3.1.2
# with:
# # Artifact name
# name: fracg_macos-x86_64
# # A file, directory or wildcard pattern that describes what to upload
# path: ${{github.workspace}}/build/FracG

# FIXME: Disable macos-arm64 builds until we have hardware to test them on
# macos-arm64-build:
# runs-on: macos-latest

# steps:
# - uses: actions/checkout@v3

# - name: Install dependencies (MacOS arm64)
# run: |
# mkdir -p ${{github.workspace}}/arm-target/bin
# mkdir -p ${{github.workspace}}/arm-target/brew-cache
# export PATH="${{github.workspace}}/arm-target/bin:$PATH"

# cd ${{github.workspace}}/arm-target
# mkdir arm-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm-homebrew
# ln -s ${{github.workspace}}/arm-target/arm-homebrew/bin/brew ${{github.workspace}}/arm-target/bin/arm-brew

# export HOMEBREW_CACHE=${{github.workspace}}/arm-target/brew-cache
# export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
# arm-brew fetch --deps --bottle-tag=arm64_big_sur gdal boost lapack gsl gmsh armadillo libomp |\
# grep -E "(Downloaded to:|Already downloaded:)" |\
# grep -v pkg-config |\
# awk '{ print $3 }' |\
# xargs -n 1 arm-brew install --ignore-dependencies --force-bottle

# - name: Configure CMake
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_PREFIX_PATH="arm-brew --prefix"

# - name: Build
# # Build your program with the given configuration
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v3.1.2
# with:
# # Artifact name
# name: fracg_macos-arm64
# # A file, directory or wildcard pattern that describes what to upload
# path: ${{github.workspace}}/build/FracG

0 comments on commit 1dec641

Please sign in to comment.