diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-02-21 12:22:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-21 12:22:51 -0800 |
| commit | 255ecf7993cc69d38525af7e711c24fae6f94ba5 (patch) | |
| tree | f2f2cf91936b8f064cc256a3390d4fe0ea0dc30b | |
| parent | b3b6c44cb8b8ebc413d41f9ca3833d8242f3c805 (diff) | |
Add new release package for aarch64 linux (#3609)
Co-authored-by: Yong He <yonghe@outlook.com>
| -rw-r--r-- | .github/workflows/release-linux-arm64.yml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/.github/workflows/release-linux-arm64.yml b/.github/workflows/release-linux-arm64.yml new file mode 100644 index 000000000..db86d6aa0 --- /dev/null +++ b/.github/workflows/release-linux-arm64.yml @@ -0,0 +1,68 @@ +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: + - name: select gcc 10 + run: | + sudo update-alternatives \ + --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-10 \ + --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \ + --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-10 \ + --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10 \ + --slave /usr/bin/gcov gcov /usr/bin/gcov-10 \ + --slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-10 \ + --slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-10 + - name: Checkout code + 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 bin/*/*/libslang-llvm.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 bin/*/*/libslang-llvm.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 }} |
