Getting started with ci/cd. Try building on macos (arm). #1
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: Build | |
on: [push] | |
jobs: | |
build-macos: | |
name: build-macos | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
fetch-depth: 0 | |
- name: Get all tags | |
run: | | |
git show-ref --tags | |
git log -40 | |
git describe | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: --preset mac-production -Wno-dev | |
build-options: --preset mac-production | |
run-test: true | |
install-build: true | |
install-options: --prefix ${{ github.workspace }}/installed | |
- name: Create installer | |
shell: bash | |
run: | | |
cpack --preset mac-production | |
ls -l build/package | |
- name: On failure, Capture build folder as artifact | |
if: ${{ failure() }} | |
shell: bash | |
run: tar cfz build.tgz build | |
- name: On failure, Upload build folder | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lldash-darwin-arm64-build-folder | |
path: build.tgz | |
- name: Upload installer folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lldash-darwin-arm64-${{ github.ref_name }}.tar.gz | |
path: build/package/lldash-darwin-arm64-*.tar.gz |