Skip to content

Commit 45d56e9

Browse files
committed
chore: set stack size limits on macOS CI to prevent stack overflow
1 parent 7ad638e commit 45d56e9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2
2727

2828
DOTNET_INSTALLED_VERSION=$(dotnet --version 2>&1)
2929

30+
echo "DOTNET_DefaultStackSize: $DOTNET_DefaultStackSize"
31+
3032
if [ "$DOTNET_VERSION" != "$DOTNET_INSTALLED_VERSION" ]; then
3133
echo "Installing .NET CLI..."
3234
if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then

templates/build-template-macos.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ jobs:
1717
vmImage: macos-latest
1818
variables:
1919
CI_TEST: true
20-
# set the default stack size to 1.5MB
21-
DOTNET_DefaultStackSize: 6291456
2220
steps:
2321
- task: UseDotNet@2
2422
displayName: 'Install .NET Core SDK'
2523
inputs:
2624
version: 8.0.303
2725
- script: bash scripts/install_protobuf.sh
2826
- script: bash scripts/download_binary.sh
29-
- script: bash build.sh --target=Test-with-Codecov-N --parts=${{ parameters.parts }} --number=${{ parameters.n }} --codecoverage=${{ parameters.codecoverage }}
27+
- script: |
28+
export DOTNET_DefaultStackSize=1572864
29+
ulimit -s 65532
30+
bash build.sh --target=Test-with-Codecov-N --parts=${{ parameters.parts }} --number=${{ parameters.n }} --codecoverage=${{ parameters.codecoverage }}
3031
displayName: 'Build and Test'
3132
- task: PublishTestResults@2
3233
condition: always()

0 commit comments

Comments
 (0)