Skip to content

Commit

Permalink
Switch from ubuntu-18 to centos-7 for older glibc build (#4496)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8172751)
  • Loading branch information
kaizhangNV committed Jul 1, 2024
1 parent 8ea3854 commit b141099
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Linux Release
name: centos7-gcc9 Release
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -15,16 +15,14 @@ jobs:
submodules: 'true'
fetch-depth: '0'

- name: build docker image
run: docker build -t ubuntu-18.04-gcc-9 ./.github/workflows/dockerfiles/ubuntu-18.04-x64

# build the binary in docker image
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: ubuntu-18.04-gcc-9
options: -v ${{ github.workspace }}:/home/app
image: slangdeveloper/centos7-gcc9
options: -v ${{ github.workspace }}:/home/app -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt
run: |
source /opt/rh/devtoolset-9/enable
cd /home/app
git config --global --add safe.directory /home/app
export CC=gcc
Expand All @@ -45,19 +43,19 @@ jobs:
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}-glibc-2.27.zip
export SLANG_BINARY_ARCHIVE_TAR=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}-glibc-2.27.tar.gz
export SLANG_BINARY_ARCHIVE=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}-glibc-2.17.zip
export SLANG_BINARY_ARCHIVE_TAR=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}-glibc-2.17.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 }}
# - 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 }}
4 changes: 2 additions & 2 deletions deps/target-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
},
{
"name" : "slang-glslang",
"baseUrl" : "https://github.com/shader-slang/slang-glslang/releases/download/v13.0.0.x-j/slang-glslang-13.0.0.x-j-",
"baseUrl" : "https://github.com/shader-slang/slang-glslang/releases/download/v13.0.0.x-k/slang-glslang-13.0.0.x-k-",
"optional" : true,
"packages" :
{
"windows-x86_64" : { "type" : "url", "path" : "windows-x64-release.zip" },
"windows-x86" : { "type": "url", "path" : "windows-win32-release.zip" },
"linux-x86_64" : { "type": "url", "path" : "linux-x64-release.zip" },
"linux-x86_64-glibc-2.27" : { "type": "url", "path" : "linux-x64-release-glibc-2.27.zip" },
"linux-x86_64-glibc-2.27" : { "type": "url", "path" : "linux-x64-release-glibc-2.17.zip" },
"linux-x86" : { "type": "url", "path" : "linux-x86-release.zip" },
"macosx-x86_64" : { "type": "url", "path" : "macosx-x86_64-release.zip" },
"windows-aarch64" : { "type" : "url", "path" : "windows-aarch64-release.zip" }
Expand Down

0 comments on commit b141099

Please sign in to comment.