CI: introduce osx-build github workflow (#6352).
This commit is contained in:
parent
34e3892367
commit
c03cb9d9c2
|
|
@ -0,0 +1,53 @@
|
||||||
|
---
|
||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
# This name is key to badges in README.rst, so we use the name build
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
#
|
||||||
|
name: osx-build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 0 * * 0 # weekly
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: repo
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build-osx-gcc:
|
||||||
|
name: Build
|
||||||
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
|
with:
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
os-name: osx
|
||||||
|
cc: ${{ matrix.cc }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- {os: macos-15, cc: gcc}
|
||||||
|
|
||||||
|
build-osx-clang:
|
||||||
|
name: Build
|
||||||
|
uses: ./.github/workflows/reusable-build.yml
|
||||||
|
with:
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
os-name: osx
|
||||||
|
cc: ${{ matrix.cc }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- {os: macos-15, cc: clang}
|
||||||
|
|
@ -13,9 +13,13 @@ on:
|
||||||
cc: # gcc or clang
|
cc: # gcc or clang
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
os-name:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: linux
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CI_OS_NAME: linux
|
CI_OS_NAME: ${{ inputs.os-name }}
|
||||||
CI_COMMIT: ${{ github.sha }}
|
CI_COMMIT: ${{ github.sha }}
|
||||||
CCACHE_COMPRESS: 1
|
CCACHE_COMPRESS: 1
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||||
fi
|
fi
|
||||||
elif [ "$CI_OS_NAME" = "osx" ]; then
|
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
brew update
|
brew update
|
||||||
brew install ccache perl gperftools
|
brew install ccache perl gperftools autoconf bison flex help2man
|
||||||
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
sudo pkg install -y autoconf bison ccache gmake perl5
|
sudo pkg install -y autoconf bison ccache gmake perl5
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue