summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-30 10:15:14 +0800
committerGitHub <noreply@github.com>2024-10-29 19:15:14 -0700
commit44dc5ea202ac43cd4f18c268e95143c2a23f5d26 (patch)
tree7faeaf99ddda7f5ee223c994f730cac0e8822fe3 /.github
parent613a29affe272772dfe0c463d866fb0b8c1d42ee (diff)
Put debug symbols in releases (#5370)
Diffstat (limited to '.github')
-rw-r--r--.github/actions/common-setup/action.yml12
-rw-r--r--.github/workflows/ci.yml22
-rw-r--r--.github/workflows/release-linux-glibc-2-17.yml12
-rw-r--r--.github/workflows/release.yml12
4 files changed, 32 insertions, 26 deletions
diff --git a/.github/actions/common-setup/action.yml b/.github/actions/common-setup/action.yml
index a2e2edd94..a270b32e0 100644
--- a/.github/actions/common-setup/action.yml
+++ b/.github/actions/common-setup/action.yml
@@ -66,10 +66,16 @@ runs:
# Some useful variables
config=${{inputs.config}}
- Config=$(echo "${{inputs.config}}" | sed 's/debug/Debug/;s/release/Release/')
- bin_dir=$(pwd)/build/$Config/bin
- lib_dir=$(pwd)/build/$Config/lib
+ cmake_config=$(echo "${{inputs.config}}" | sed '
+ s/^debug$/Debug/
+ s/^release$/Release/
+ s/^releaseWithDebugInfo$/RelWithDebInfo/
+ s/^minSizeRelease$/MinSizeRel/
+ ')
+ bin_dir=$(pwd)/build/$cmake_config/bin
+ lib_dir=$(pwd)/build/$cmake_config/lib
echo "config=$config" >> "$GITHUB_ENV"
+ echo "cmake_config=$cmake_config" >> "$GITHUB_ENV"
echo "bin_dir=$bin_dir" >> "$GITHUB_ENV"
echo "lib_dir=$lib_dir" >> "$GITHUB_ENV"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3c32db8c6..6f0aa2d93 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [linux, macos, windows]
- config: [debug, release]
+ config: [debug, releaseWithDebugInfo]
compiler: [gcc, clang, cl]
platform: [x86_64, aarch64, wasm]
exclude:
@@ -54,14 +54,14 @@ jobs:
# quick or full conditionally otherwise
- test-category: smoke
- { os: windows, test-category: quick }
- - { config: release, test-category: full }
+ - { config: releaseWithDebugInfo, test-category: full }
# default not full gpu tests
- full-gpu-tests: false
# The runners don't have a GPU by default except for the self-hosted ones
- has-gpu: false
# Self-hosted aarch64 build
- os: linux
- config: release
+ config: releaseWithDebugInfo
compiler: gcc
platform: aarch64
test-category: smoke
@@ -70,7 +70,7 @@ jobs:
has-gpu: true
# Self-hosted full gpu build
- os: windows
- config: release
+ config: releaseWithDebugInfo
compiler: cl
platform: x86_64
test-category: full
@@ -109,13 +109,13 @@ jobs:
cmake --workflow --preset generators --fresh
mkdir generators
cmake --install build --prefix generators --component generators
- emcmake cmake -DSLANG_GENERATORS_PATH=generators/bin --preset emscripten -G "Ninja" -DSLANG_SLANG_LLVM_FLAVOR=DISABLE
- cmake --build --preset emscripten --target slang
- [ -f "build.em/Release/lib/libslang.a" ]
- [ -f "build.em/Release/lib/libcompiler-core.a" ]
- [ -f "build.em/Release/lib/libcore.a" ]
+ emcmake cmake -DSLANG_GENERATORS_PATH=generators/bin --preset emscripten -DSLANG_SLANG_LLVM_FLAVOR=DISABLE
+ cmake --build --preset emscripten --config "$cmake_config" --target slang
+ [ -f "build.em/$cmake_config/lib/libslang.a" ]
+ [ -f "build.em/$cmake_config/lib/libcompiler-core.a" ]
+ [ -f "build.em/$cmake_config/lib/libcore.a" ]
else
- if [[ "${{ matrix.os }}" =~ "windows" && "${{ matrix.config }}" != "release" ]]; then
+ if [[ "${{ matrix.os }}" =~ "windows" && "${{ matrix.config }}" != "release" && "${{ matrix.config }}" != "releaseWithDebugInfo" ]]; then
# Doing a debug build will try to link against a release built llvm, this
# is a problem on Windows, so make slang-llvm in release build and use
# that as though it's a fetched binary via these presets.
@@ -127,7 +127,7 @@ jobs:
"-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}}"
cmake --workflow --preset "${{matrix.config}}"
else
- # Otherwise, use the system llvm we have just build or got from the
+ # Otherwise, use the "system" llvm we have just build or got from the
# cache in the setup phase
cmake --preset default --fresh \
-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
diff --git a/.github/workflows/release-linux-glibc-2-17.yml b/.github/workflows/release-linux-glibc-2-17.yml
index d147f38e1..e3f47d9a9 100644
--- a/.github/workflows/release-linux-glibc-2-17.yml
+++ b/.github/workflows/release-linux-glibc-2-17.yml
@@ -27,9 +27,9 @@ jobs:
cd /home/app
git config --global --add safe.directory /home/app
cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=DISABLE -DSLANG_EMBED_STDLIB=1
- cmake --build --preset release
- cpack --preset release -G ZIP
- cpack --preset release -G TGZ
+ cmake --build --preset releaseWithDebugInfo
+ cpack --preset releaseWithDebugInfo -G ZIP
+ cpack --preset releaseWithDebugInfo -G TGZ
- name: Package Slang
id: package
@@ -38,15 +38,15 @@ jobs:
version=${triggering_ref#v}
base=$(pwd)/slang-${version}-linux-x86_64-glibc-2.17
- sudo mv "$(pwd)/build/dist-release/slang.zip" "${base}.zip"
+ sudo mv "$(pwd)/build/dist-releaseWithDebugInfo/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"
+ sudo mv "$(pwd)/build/dist-releaseWithDebugInfo/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
+ find "build/dist-releaseWithDebugInfo" -print0 ! -iname '*.md' ! -iname '*.h' -type f | xargs -0 file
- name: UploadBinary
uses: softprops/action-gh-release@v1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6681837b9..0f2375f44 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [linux, macos, windows]
- config: [release]
+ config: [releaseWithDebugInfo]
platform: [x86_64, aarch64]
test-category: [smoke]
include:
@@ -57,7 +57,7 @@ jobs:
run: |
cmake --workflow --preset generators --fresh
mkdir build-platform-generators
- cmake --install build --config Release --component generators --prefix build-platform-generators
+ cmake --install build --config $cmake_config --component generators --prefix build-platform-generators
- name: Change dev tools to host arch (windows)
uses: ilammy/msvc-dev-cmd@v1
@@ -80,8 +80,8 @@ jobs:
- name: Build Slang
run: |
- if [[ "${{ matrix.os }}" == "windows" && "${{ matrix.config }}" != "release" ]]; then
- echo "Please see ci.yml for the steps to make debug builds work on Windows" >&2
+ if [[ "${{ matrix.os }}" == "windows" && "${{ matrix.config }}" != "release" && "${{ matrix.config }}" != "releaseWithDebugInfo" ]]; then
+ echo "Please see ci.yml for the steps to make non-release builds work on Windows" >&2
exit 1
fi
@@ -169,8 +169,8 @@ jobs:
mkdir ./ttmp
unzip "${base}.zip" -d ./ttmp
- /bin/cp -rf build/Release/bin/* ./ttmp/bin/
- /bin/cp -rf build/Release/lib/* ./ttmp/lib/
+ /bin/cp -rf build/$cmake_config/bin/* ./ttmp/bin/
+ /bin/cp -rf build/$cmake_config/lib/* ./ttmp/lib/
rm ${base}.zip
rm ${base}.tar.gz
cd ./ttmp