diff options
| -rw-r--r-- | .github/workflows/release-linux-arm64.yml | 56 | ||||
| -rw-r--r-- | github_build.sh | 11 |
2 files changed, 64 insertions, 3 deletions
diff --git a/.github/workflows/release-linux-arm64.yml b/.github/workflows/release-linux-arm64.yml new file mode 100644 index 000000000..aa7b8f832 --- /dev/null +++ b/.github/workflows/release-linux-arm64.yml @@ -0,0 +1,56 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Linux ARM64 Release + +jobs: + build: + name: Upload Release Asset + runs-on: ['self-hosted', 'Linux', 'ARM64'] + strategy: + matrix: + configuration: ['release'] + compiler: ['gcc'] + platform: ['aarch64'] + targetPlatform: ['aarch64'] + steps: + - uses: actions/checkout@v3 + 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}} + export TARGETARCH=${{matrix.targetPlatform}} + echo "building..." + source ./github_build.sh + echo "creating binary archieves..." + export SLANG_OS_NAME=linux + 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.so bin/*/*/libslang-glslang.so bin/*/*/libgfx.so 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.so bin/*/*/libslang-glslang.so bin/*/*/libgfx.so 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 "SLANG_BINARY_ARCHIVE=${SLANG_BINARY_ARCHIVE}" >> $GITHUB_OUTPUT + echo "SLANG_BINARY_ARCHIVE_TAR=${SLANG_BINARY_ARCHIVE_TAR}" >> $GITHUB_OUTPUT + - 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 }} diff --git a/github_build.sh b/github_build.sh index 357989ccc..c35cff192 100644 --- a/github_build.sh +++ b/github_build.sh @@ -15,10 +15,15 @@ if [[ "" == "${TARGETARCH}" ]]; then TARGETARCH=${ARCH} fi +glslangBuildFlag="" +if [[ "aarch64" == "${TARGETARCH}" && "release" == "${CONFIGURATION}" ]]; then + glslangBuildFlag="--build-glslang=true" +fi + if [[ "${ARCH}" != "${TARGETARCH}" ]]; then # Create the makefile -./premake5 gmake2 --cc=${CC} --enable-embed-stdlib=true --arch=${ARCH} --deps=true --no-progress=true +./premake5 gmake2 --cc=${CC} --enable-embed-stdlib=true --arch=${ARCH} --deps=true --no-progress=true ${glslangBuildFlag} # Build the configuration make config=${CONFIGURATION}_${ARCH} -j`nproc` @@ -26,11 +31,11 @@ make config=${CONFIGURATION}_${ARCH} -j`nproc` rm -rf ./bin # Create the makefile -./premake5 gmake2 --cc=${CC} --enable-embed-stdlib=true --arch=${TARGETARCH} --deps=true --no-progress=true --skip-source-generation=true --deploy-slang-llvm=false --deploy-slang-glslang=false +./premake5 gmake2 --cc=${CC} --enable-embed-stdlib=true --arch=${TARGETARCH} --deps=true --no-progress=true --skip-source-generation=true --deploy-slang-llvm=false --deploy-slang-glslang=false ${glslangBuildFlag} else # Create the makefile -./premake5 gmake2 --cc=${CC} --enable-embed-stdlib=true --arch=${TARGETARCH} --deps=true --no-progress=true +./premake5 gmake2 --cc=${CC} --enable-embed-stdlib=true --arch=${TARGETARCH} --deps=true --no-progress=true ${glslangBuildFlag} fi # Build the configuration |
