diff options
| author | Yong He <yonghe@outlook.com> | 2022-06-13 18:50:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-13 18:50:35 -0700 |
| commit | ebcda2ec8b1cfb54f52329bb1134511ca4d4dbff (patch) | |
| tree | 7c5eb2a4c25487fd5e2214faf7ba78f86f5961d1 /.github | |
| parent | a5422d4f8c43962147696e3b6b22d586133b9a4f (diff) | |
Upload artifact in macos build. (#2271)
* Update macos.yml
* fix.
* Create macos release.
* fix.
* fix
* Update release-macos.yml
* Update release-macos.yml
* Update macos.yml
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/macos.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/release-macos.yml | 55 |
2 files changed, 65 insertions, 1 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ba92715fc..2feb44712 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -30,10 +30,19 @@ jobs: CONFIGURATION=${{matrix.configuration}} ARCH=${{matrix.platform}} source ./github_macos_build.sh + - uses: actions/upload-artifact@v3 + with: + name: slang-build-${{matrix.configuration}}-${{matrix.platform}}-${{matrix.compiler}} + path: | + bin/**/slangc + bin/**/slangd + bin/**/libslang.dylib + bin/**/libslang-llvm.dylib + bin/**/libslang-glslang.dylib - name: test run: CONFIGURATION=${{matrix.configuration}} CC=${{matrix.compiler}} ARCH=${{matrix.platform}} source ./github_test.sh -
\ No newline at end of file + diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml new file mode 100644 index 000000000..2fa5023c4 --- /dev/null +++ b/.github/workflows/release-macos.yml @@ -0,0 +1,55 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Upload Release Asset + +jobs: + build: + name: Upload Release Asset + runs-on: macos-latest + strategy: + matrix: + configuration: ['release'] # 'debug' + compiler: ['clang'] + platform: ['x64'] + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: 'true' + fetch-depth: '0' + - name: Build release project + id: build + run: | + echo "starting to build..." + export CC=${{matrix.compiler}} + export CONFIGURATION=${{matrix.configuration}} + export ARCH=${{matrix.platform}} + echo "building..." + source ./github_macos_build.sh + echo "creating binary archieves..." + export SLANG_OS_NAME=macos + export SLANG_ARCH_NAME=`uname -p` + 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 + export SLANG_BINARY_ARCHIVE_TAR=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.tar.gz + echo "creating zip" + zip -r ${SLANG_BINARY_ARCHIVE} bin/*/*/slangc bin/*/*/slangd bin/*/*/libslang.dylib bin/*/*/libslang-glslang.dylib bin/*/*/libgfx.dylib bin/*/*/libslang-llvm.dylib docs/*.md README.md LICENSE slang.h slang-com-helper.h slang-com-ptr.h slang-tag-version.h slang-gfx.h prelude/*.h + echo "creating tar" + tar -czf ${SLANG_BINARY_ARCHIVE_TAR} bin/*/*/slangc bin/*/*/slangd bin/*/*/libslang.dylib bin/*/*/libslang-glslang.dylib bin/*/*/libgfx.dylib bin/*/*/libslang-llvm.dylib docs/*.md README.md LICENSE slang.h slang-com-helper.h slang-com-ptr.h slang-tag-version.h slang-gfx.h prelude/*.h + echo "::set-output name=SLANG_BINARY_ARCHIVE::${SLANG_BINARY_ARCHIVE}" + echo "::set-output name=SLANG_BINARY_ARCHIVE_TAR::${SLANG_BINARY_ARCHIVE_TAR}" + - name: UploadBinary + uses: softprops/action-gh-release@v1 + with: + files: | + ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }} + ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE_TAR }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
