Skip to content

Commit

Permalink
switch from ubuntu-18 to centos-7 build
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhangNV committed Jun 27, 2024
1 parent 5dd8f29 commit beaf345
Showing 1 changed file with 38 additions and 35 deletions.
73 changes: 38 additions & 35 deletions .github/workflows/release-linux-glibc-2-27.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# on:
# push:
# # Sequence of patterns matched against refs/tags
# tags:
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
#
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
branches: [ master ]
pull_request:
branches: [ master ]

name: Linux Release
name: centos7-gcc9 Release
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -15,15 +21,12 @@ 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 /etc/ssl/certs:/etc/ssl/certs
run: |
cd /home/app
git config --global --add safe.directory /home/app
Expand All @@ -35,29 +38,29 @@ jobs:
export GLIBC_COMPATIBLE=1
/bin/bash ./github_build.sh
- name: CreatePackages
id: build
run: |
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}-glibc-2.27.zip
export SLANG_BINARY_ARCHIVE_TAR=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}-glibc-2.27.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: CreatePackages
# id: build
# run: |
# 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}-glibc-2.27.zip
# export SLANG_BINARY_ARCHIVE_TAR=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}-glibc-2.27.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 }}

0 comments on commit beaf345

Please sign in to comment.