mirror of
https://github.com/ninja-build/ninja.git
synced 2025-12-30 18:10:16 -06:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: macOS
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: ['**']
|
|
tags-ignore: ['**'] # Don't trigger on tag pushes
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-13
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install dependencies
|
|
run: brew install re2c
|
|
|
|
- name: Build ninja
|
|
shell: bash
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: 10.15
|
|
run: |
|
|
cmake -Bbuild -GXcode '-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64' -DCMAKE_COMPILE_WARNING_AS_ERROR=1
|
|
cmake --build build --config Release
|
|
|
|
- name: Test ninja (Release)
|
|
run: ./ninja_test
|
|
working-directory: build/Release
|
|
|
|
- name: Create ninja archive
|
|
shell: bash
|
|
run: |
|
|
mkdir artifact
|
|
7z a artifact/ninja-mac.zip ./build/Release/ninja
|
|
|
|
# Upload ninja binary archive as an artifact
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: ninja-binary-archives
|
|
path: artifact
|
|
|
|
- name: Upload release asset
|
|
if: github.event.action == 'published'
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
allowUpdates: true # if release exists it will edit it.
|
|
artifactContentType: "application/zip" # if empty defaults to raw
|
|
replacesArtifacts: true # will update existing release assets if needed.
|
|
omitBodyDuringUpdate: true # don't edit release body when published via webui
|
|
artifacts: ./artifact/ninja-mac.zip # release asset
|