Skip to content
name: macos-arm64-llvm-msvc-build
permissions:
contents: write
on: [push, pull_request]
jobs:
build:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
os: [macos-latest]
env:
BUILD_TYPE: Release
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
path: llvm-msvc
submodules: 'recursive'
- name: Setup build deps
run: |
brew install ninja cmake p7zip
- name: Build llvm
run: |
cmake -GNinja -Bbuild \
-DCMAKE_INSTALL_PREFIX=install \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_TOOL_LLVM_SHLIB_BUILD=off \
-DHAVE_STD_IS_TRIVIALLY_COPYABLE=0 \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DLLVM_TARGETS_TO_BUILD="AArch64" \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
llvm-msvc/llvm
time cmake --build build --config ${{ env.BUILD_TYPE }}
cmake --build build --config ${{ env.BUILD_TYPE }} --target install
- name: Package llvm
run: 7z a macos-arm64-llvm-msvc.zip install
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: macos-arm64-llvm-msvc
path: macos-arm64-llvm-msvc.zip
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }}
files: macos-arm64-llvm-msvc.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}