Skip to content

Commit

Permalink
ci: Move mac builds to GitHub Actions since Azure builds are unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Atkins committed Jun 15, 2020
1 parent 130c4f1 commit df176a4
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 33 deletions.
35 changes: 34 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
entrypoint: /usr/bin/sh -c
- name: Setup
run: scripts/ci/gh-actions/linux-setup.sh
- name: Update
Expand Down Expand Up @@ -112,3 +111,37 @@ jobs:
run: scripts/ci/gh-actions/run.sh build
- name: Test
run: scripts/ci/gh-actions/run.sh test

macos:
runs-on: ${{ matrix.os }}
env:
GH_YML_JOBNAME: ${{ matrix.jobname }}
GH_YML_OS: macOS

strategy:
fail-fast: false
matrix:
jobname: [
macos1015-xcode111-make,
macos1015-xcode111-ninja ]
include:
- jobname: macos1015-xcode111-make
os: macos-10.15
- jobname: macos1015-xcode111-ninja
os: macos-10.15

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
entrypoint: /usr/bin/sh -c
- name: Setup
run: scripts/ci/gh-actions/macos-setup.sh
- name: Update
run: scripts/ci/gh-actions/run.sh update
- name: Configure
run: scripts/ci/gh-actions/run.sh configure
- name: Build
run: scripts/ci/gh-actions/run.sh build
- name: Test
run: scripts/ci/gh-actions/run.sh test
44 changes: 22 additions & 22 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ jobs:
- bash: scripts/ci/azure/run.sh test
name: Test

- job: macos
timeoutInMinutes: 90
strategy:
matrix:
macos1014_xcode103_ninja:
hostImage: 'macOS-10.14'
macos1015_xcode111_make:
hostImage: 'macOS-10.15'

pool:
vmImage: $[ variables['hostImage'] ]
steps:
- bash: scripts/ci/azure/macos-setup.sh
name: Setup
- bash: scripts/ci/azure/run.sh update
name: Update
- bash: scripts/ci/azure/run.sh configure
name: Configure
- bash: scripts/ci/azure/run.sh build
name: Build
- bash: scripts/ci/azure/run.sh test
name: Test
#- job: macos
# timeoutInMinutes: 90
# strategy:
# matrix:
# macos1014_xcode103_ninja:
# hostImage: 'macOS-10.14'
# macos1015_xcode111_make:
# hostImage: 'macOS-10.15'
#
# pool:
# vmImage: $[ variables['hostImage'] ]
# steps:
# - bash: scripts/ci/azure/macos-setup.sh
# name: Setup
# - bash: scripts/ci/azure/run.sh update
# name: Update
# - bash: scripts/ci/azure/run.sh configure
# name: Configure
# - bash: scripts/ci/azure/run.sh build
# name: Build
# - bash: scripts/ci/azure/run.sh test
# name: Test

- job: linux
timeoutInMinutes: 90
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-macos1015-xcode111-make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(ENV{FC} gfortran)
set(dashboard_cache "
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADISO2_USE_Python:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
")

set(ENV{MACOSX_DEPLOYMENT_TARGET} "10.15")
Expand Down
15 changes: 15 additions & 0 deletions scripts/ci/cmake/ci-macos1015-xcode111-ninja.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Client maintainer: chuck.atkins@kitware.com
set(ENV{CC} clang)
set(ENV{CXX} clang++)
set(ENV{FC} gfortran)

set(dashboard_cache "
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
")

set(ENV{MACOSX_DEPLOYMENT_TARGET} "10.15")
set(CTEST_CMAKE_GENERATOR "Ninja")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
25 changes: 16 additions & 9 deletions scripts/ci/gh-actions/macos-setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

echo "Setting up default XCode version"
case "$GH_YML_JOBNAME" in
case "${GH_YML_JOBNAME}" in
*xcode941*)
sudo xcode-select --switch /Applications/Xcode_9.4.1.app
;;
Expand All @@ -16,23 +16,30 @@ case "$GH_YML_JOBNAME" in
;;
esac

echo "Installing CMake Nightly"
curl -L https://cmake.org/files/dev/cmake-3.16.20191218-g8262562-Darwin-x86_64.tar.gz | sudo tar -C /Applications --strip-components=1 -xzv
echo "Installing CMake"
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Darwin-x86_64.tar.gz | sudo tar -C /Applications --strip-components=1 -xz

echo "Installing Kitware Ninja"
brew install ninja
echo "Removing all existing brew packages"
brew remove --force $(brew list)

echo "Installing cmake and ninja"
brew install cmake ninja

echo "Installing GCC"
brew install gcc

echo "Installing blosc compression"
brew install c-blosc

echo "Installing python3"
brew install python numpy
echo "Installing python and numpy"
brew install python
pip3 install numpy

if [[ "$GH_YML_JOBNAME" =~ .*openmpi.* ]]
if [[ "${GH_YML_JOBNAME}" =~ .*openmpi.* ]]
then
echo "Installing OpenMPI"
brew install openmpi mpi4py
brew install openmpi

echo "Installing mpi4py"
pip3 install mpi4py
fi

0 comments on commit df176a4

Please sign in to comment.