-
Notifications
You must be signed in to change notification settings - Fork 74
65 lines (65 loc) · 2.33 KB
/
ci-macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: macOS CI
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches: ["main"]
tags: ["**"]
pull_request:
branches: ["main"]
jobs:
macos:
name: LLVM ${{ matrix.LLVM_VERSION }}
runs-on: macos-latest
strategy:
matrix:
include:
- OS_NAME: "macos"
LLVM_VERSION: 13
- OS_NAME: "macos"
LLVM_VERSION: 14
- OS_NAME: "macos"
LLVM_VERSION: 15
- OS_NAME: "macos"
LLVM_VERSION: 16
- OS_NAME: "macos"
LLVM_VERSION: 17
- OS_NAME: "macos"
LLVM_VERSION: 18
steps:
- name: Fix git
run: |
git config --global --add safe.directory $PWD
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/detect-package-metadata
id: metadata
- name: Run CI task
run: |
brew install zlib ncurses sqlite ninja llvm@${{ matrix.LLVM_VERSION }}
pip3 install -r requirements.txt --break-system-packages
./infrastructure/generator.py cmake --os macos --llvm_version ${{ matrix.LLVM_VERSION }}
cmake --preset mull -DMULL_VERSION=${{ steps.metadata.outputs.version }}${{ steps.metadata.outputs.suffix }}
cmake --workflow --preset build-and-test
cmake --workflow --preset package
./tests/end2end/setup_end2end_tests.sh
./tests/end2end/run_end2end_tests.sh macos ${{ matrix.LLVM_VERSION }}
mull-runner-${{ matrix.LLVM_VERSION }} --version
- name: Publish package
if: env.CLOUDSMITH_API_KEY != null
run: |
cloudsmith push raw \
--name mull-`echo ${{ matrix.LLVM_VERSION }} | awk -F. ' { print $1 } '` \
--version ${{ steps.metadata.outputs.version }}${{ steps.metadata.outputs.suffix }} \
mull-project/mull-${{ steps.metadata.outputs.channel }} \
--tags macos \
build.${{ matrix.OS_NAME }}.${{ matrix.LLVM_VERSION }}.dir/*.zip
- name: Move package
run: |
mkdir -p /tmp/packages
mv build.${{ matrix.OS_NAME }}.${{ matrix.LLVM_VERSION }}.dir/*.zip /tmp/packages/
- uses: ./.github/actions/attach-package
with:
GH_API_KEY: ${{ secrets.GITHUB_TOKEN }}