summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-06-09 13:37:09 -0700
committerGitHub <noreply@github.com>2025-06-09 20:37:09 +0000
commitab6b5f28d332f201fd96b7e05070116684d02899 (patch)
treed3ee160b2d0ccca82ba737b3ca4edfd16e2332d4 /.github
parentbfae49d853e0f9b6f9de495b13bcd1642ca4a285 (diff)
Add release workflow targeting glibc2.17 with ubuntu 18 (#7363)
* Add release workflow targeting glibc 2.17 * format code (#7366) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> * Update comment --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release-linux-glibc-2-27.yml59
1 files changed, 59 insertions, 0 deletions
diff --git a/.github/workflows/release-linux-glibc-2-27.yml b/.github/workflows/release-linux-glibc-2-27.yml
new file mode 100644
index 000000000..d371cba3e
--- /dev/null
+++ b/.github/workflows/release-linux-glibc-2-27.yml
@@ -0,0 +1,59 @@
+on:
+ workflow_dispatch:
+ push:
+ tags:
+ - "v*"
+
+name: ubuntu18-gcc11 Release
+jobs:
+ build:
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: "recursive"
+ fetch-depth: "0"
+
+ # build the binary in docker image
+ - name: Run the build process with Docker
+ uses: addnab/docker-run-action@v3
+ with:
+ # TODO: Move the image to a more appropriate registry
+ image: gztong/ubuntu18-gcc11:glibc2.28
+ options: -v ${{ github.workspace }}:/home/app -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt
+ run: |
+ export PATH=/opt/cmake-3.25.0-linux-x86_64/bin:$PATH
+ cd /home/app
+ git config --global --add safe.directory /home/app
+ cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=DISABLE
+ cmake --build --preset release -j $(nproc)
+ cpack --preset release -G ZIP
+ cpack --preset release -G TGZ
+ - name: Package Slang
+ id: package
+ run: |
+ triggering_ref=${{ github.ref_name }}
+ if [[ $triggering_ref =~ ^v[0-9] ]]; then
+ version=${triggering_ref#v}
+ else
+ version=$triggering_ref
+ fi
+ base=$(pwd)/slang-${version}-linux-x86_64-glibc-2.27
+ sudo mv "$(pwd)/build/dist-release/slang.zip" "${base}.zip"
+ echo "SLANG_BINARY_ARCHIVE_ZIP=${base}.zip" >> "$GITHUB_OUTPUT"
+ sudo mv "$(pwd)/build/dist-release/slang.tar.gz" "${base}.tar.gz"
+ echo "SLANG_BINARY_ARCHIVE_TAR=${base}.tar.gz" >> "$GITHUB_OUTPUT"
+ - name: File check
+ run: |
+ find "build/dist-release" -print0 ! -iname '*.md' ! -iname '*.h' -type f | xargs -0 file
+ - name: UploadBinary
+ uses: softprops/action-gh-release@v1
+ if: startsWith(github.ref, 'refs/tags/v')
+ with:
+ draft: ${{contains(github.ref, 'draft')}}
+ prerelease: ${{contains(github.ref, 'draft')}}
+ files: |
+ ${{ steps.package.outputs.SLANG_BINARY_ARCHIVE_ZIP }}
+ ${{ steps.package.outputs.SLANG_BINARY_ARCHIVE_TAR }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}