|
| 1 | +on: |
| 2 | + push: |
| 3 | + # Sequence of patterns matched against refs/tags |
| 4 | + tags: |
| 5 | + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
| 6 | + |
| 7 | +name: Linux ARM64 Release |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + name: Upload Release Asset |
| 12 | + runs-on: ['self-hosted', 'Linux', 'ARM64'] |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + configuration: ['release'] |
| 16 | + compiler: ['gcc'] |
| 17 | + platform: ['aarch64'] |
| 18 | + targetPlatform: ['aarch64'] |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v3 |
| 21 | + with: |
| 22 | + submodules: 'true' |
| 23 | + fetch-depth: '0' |
| 24 | + - name: Build release project |
| 25 | + id: build |
| 26 | + run: | |
| 27 | + echo "starting to build..." |
| 28 | + export CC=${{matrix.compiler}} |
| 29 | + export CONFIGURATION=${{matrix.configuration}} |
| 30 | + export ARCH=${{matrix.platform}} |
| 31 | + export TARGETARCH=${{matrix.targetPlatform}} |
| 32 | + echo "building..." |
| 33 | + source ./github_build.sh |
| 34 | + echo "creating binary archieves..." |
| 35 | + export SLANG_OS_NAME=linux |
| 36 | + export SLANG_ARCH_NAME=`uname -p` |
| 37 | + export TAG_NAME=`git describe --tags` |
| 38 | + export SLANG_TAG=${TAG_NAME#v} |
| 39 | + echo "tag:$TAG_NAME" |
| 40 | + echo "slang-tag:$SLANG_TAG" |
| 41 | + export SLANG_BINARY_ARCHIVE=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.zip |
| 42 | + export SLANG_BINARY_ARCHIVE_TAR=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.tar.gz |
| 43 | + echo "creating zip" |
| 44 | + 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 |
| 45 | + echo "creating tar" |
| 46 | + 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 |
| 47 | + echo "SLANG_BINARY_ARCHIVE=${SLANG_BINARY_ARCHIVE}" >> $GITHUB_OUTPUT |
| 48 | + echo "SLANG_BINARY_ARCHIVE_TAR=${SLANG_BINARY_ARCHIVE_TAR}" >> $GITHUB_OUTPUT |
| 49 | + - name: UploadBinary |
| 50 | + uses: softprops/action-gh-release@v1 |
| 51 | + with: |
| 52 | + files: | |
| 53 | + ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }} |
| 54 | + ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE_TAR }} |
| 55 | + env: |
| 56 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments