forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (70 loc) · 2.39 KB
/
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
66
67
68
69
70
71
72
name: MacOS Build CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: MacOS Build CI
runs-on: macos-latest
strategy:
matrix:
configuration: ['release'] # 'debug'
compiler: ['clang']
platform: ['x64']
targetPlatform: ['x64']
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: '0'
- name: build
run: |
CC=${{matrix.compiler}}
CONFIGURATION=${{matrix.configuration}}
ARCH=${{matrix.platform}}
TARGETARCH=${{matrix.targetPlatform}}
CPPFLAGS=-Werror
CFLAGS=-Werror
CXXFLAGS=-Werror
source ./github_macos_build.sh
- name: Package
id: package
run: |
export SLANG_OS_NAME=macos
export SLANG_ARCH_NAME=${{matrix.targetPlatform}}
export TAG_NAME=`git describe --tags`
export SLANG_TAG=${TAG_NAME#v}
echo "tag:$TAG_NAME"
echo "slang-tag:$SLANG_TAG"
export SLANG_BINARY_ARCHIVE=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.zip
echo "creating zip"
7z a ${SLANG_BINARY_ARCHIVE} slang.h
7z a ${SLANG_BINARY_ARCHIVE} slang-com-helper.h
7z a ${SLANG_BINARY_ARCHIVE} slang-com-ptr.h
7z a ${SLANG_BINARY_ARCHIVE} slang-tag-version.h
7z a ${SLANG_BINARY_ARCHIVE} slang-gfx.h
7z a ${SLANG_BINARY_ARCHIVE} prelude/*.h
7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/libslang.dylib
7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/libslang-glslang.dylib
7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/libgfx.dylib
7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/slangc
7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/slangd
7z a ${SLANG_BINARY_ARCHIVE} docs/*.md
echo "SLANG_BINARY_ARCHIVE=${SLANG_BINARY_ARCHIVE}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
with:
name: slang-build-${{matrix.configuration}}-${{matrix.targetPlatform}}-${{matrix.compiler}}
path: |
${{ steps.package.outputs.SLANG_BINARY_ARCHIVE }}
- name: test
if: ${{ matrix.targetPlatform != 'aarch64' }}
run:
CONFIGURATION=${{matrix.configuration}}
CC=${{matrix.compiler}}
ARCH=${{matrix.targetPlatform}}
source .github/github_test.sh