-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (44 loc) · 1.61 KB
/
build-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
name: "macOS"
on: [push, workflow_dispatch]
env:
VCPKG_FEATURE_FLAGS: "registries,binarycaching,manifests,versions"
jobs:
macos12:
runs-on: "macos-12"
strategy:
fail-fast: false
matrix:
triplet: [x64-osx, arm64-ios]
env:
VCPKG_DOWNLOADS: "/usr/local/share/vcpkg-downloads"
VCPKG_DEFAULT_BINARY_CACHE: "/usr/local/share/vcpkg-archives"
VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports"
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/triplets
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: "create cache folders"
run: |
mkdir -p ${VCPKG_DOWNLOADS}
mkdir -p ${VCPKG_DEFAULT_BINARY_CACHE}
- uses: actions/cache@v3
with:
key: "v2340-libtorch-${{ runner.os }}-${{ matrix.triplet }}"
path: |
/usr/local/share/vcpkg-downloads
/usr/local/share/vcpkg-archives
- uses: ConorMacBride/install-package@v1
with:
brew: ninja autoconf automake libtool
- uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "/usr/local/share/vcpkg" # see VCPKG_INSTALLATION_ROOT
vcpkgGitCommitId: 9edb1b8e590cc086563301d735cae4b6e732d2d2 # 2023.08.09
vcpkgJsonGlob: "test/vcpkg.json"
runVcpkgInstall: true
runVcpkgFormatString: '[`install`, `--clean-buildtrees-after-build`, `--clean-packages-after-build`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`]'
env:
VCPKG_DEFAULT_TRIPLET: "${{ matrix.triplet }}"