CI: remove unused params, clarify steps #1223
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macOS | |
on: | |
pull_request: | |
push: | |
release: | |
types: published | |
jobs: | |
build: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: brew install re2c p7zip cmake | |
env: | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
- name: Configure ninja | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.15 | |
run: cmake -Bbuild -GXcode '-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64' | |
- name: Build ninja | |
run: cmake --build build --config Release --parallel | |
- name: Test ninja | |
run: ctest --test-dir build -C Release -V | |
- 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@v3 | |
with: | |
name: ninja-binary-archives | |
path: artifact | |
- name: Upload release asset | |
if: github.event.action == 'published' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./artifact/ninja-mac.zip | |
asset_name: ninja-mac.zip | |
asset_content_type: application/zip |