This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
Merge pull request #26 from kaizhangNV/master #27
Workflow file for this run
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: Upload Asset - Linux | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build: | |
name: Upload Asset - Linux | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
configuration: ['release'] # , 'debug'] | |
platform: ['x64', 'aarch64' ] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
submodules: 'true' | |
fetch-depth: '0' | |
# Build from the tag that triggered the build | |
ref: ${{github.ref_name}} | |
- name: premake | |
run: | | |
PREMAKE=external/slang-binaries/premake/premake-5.0.0-alpha16/bin/linux-64/premake5 | |
chmod u+x ${PREMAKE} | |
${PREMAKE} gmake --deps=true --no-progress=true | |
- name: Build | |
run: | | |
if [[ "${{matrix.platform}}" == "aarch64" ]]; then | |
source .github/workflows/setup-crosscompile-arm.sh | |
CC=aarch64-linux-gnu-gcc-9 CXX=aarch64-linux-gnu-g++-9 make config=${{matrix.configuration}}_${{matrix.platform}} -j`nproc` | |
else | |
make config=${{matrix.configuration}}_${{matrix.platform}} -j`nproc` | |
fi | |
- name: archive | |
id: archive | |
run: | | |
echo "achiving files..." | |
ARCH_NAME=`uname -p` | |
TAG_NAME=`git describe --tags` | |
GLSLANG_VERSION=${TAG_NAME#"v"} | |
echo "tag:$TAG_NAME" | |
echo "glslang-version:$GLSLANG_VERSION" | |
BIN_ARCHIVE="slang-glslang-$GLSLANG_VERSION-linux-${{matrix.platform}}-${{matrix.configuration}}.zip" | |
zip "$BIN_ARCHIVE" README.md | |
zip "$BIN_ARCHIVE" LICENSE | |
zip "$BIN_ARCHIVE" -r bin/*/*/*.so | |
echo "name=BINARY_ARCHIVE::$BIN_ARCHIVE" | |
echo "::set-output name=BINARY_ARCHIVE::$BIN_ARCHIVE" | |
- name: Upload Archive | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{ steps.archive.outputs.BINARY_ARCHIVE }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |