add llvm build test #4
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: MacOS Build CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
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} prelude/*.h | |
7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/libslang.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_test.sh |