Skip to content

Commit

Permalink
add --gs-DISABLENATIVECODE to disable native code use running 3.7.0 o…
Browse files Browse the repository at this point in the history
…n Darwin
  • Loading branch information
dalehenrich committed Nov 12, 2023
1 parent a29924e commit 299caf4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
build:
strategy:
matrix:
os: [ ubuntu-20.04 ]
os: [ ubuntu-20.04, macos-latest ]
smalltalk:
- GemStone64-3.6.6
- GemStone64-3.7.0
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
run: |
export CI="true"
tests/all_tests.sh
bin/smalltalkci -s ${{ matrix.smalltalk }} --self-test
bin/smalltalkci --gs-DISABLENATIVECODE --s ${{ matrix.smalltalk }} --self-test
shell: bash
if: contains(matrix.smalltalk, 'trunk') == false && contains(matrix.smalltalk, 'alpha') == false && contains(matrix.smalltalk, 'Squeak32-6.0') == false && contains(matrix.smalltalk, 'GToolkit64') == false
timeout-minutes: ${{ matrix.timeout-minutes }}
Expand Down
13 changes: 13 additions & 0 deletions gemstone/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ local SUPERDOIT_DOWNLOAD=https://github.com/dalehenrich/superDoit.git
local GSDEVKIT_STONES_BRANCH=v1.1.2
local [email protected]:GsDevKit/GsDevKit_stones.git
local GSDEVKIT_STONES_DOWNLOAD=https://github.com/GsDevKit/GsDevKit_stones.git
local STONES_DISABLENATIVECODE="false"
local STONES_REGISTRY_NAME=""
local STONES_DIRECTORY=""
local STONE_DIRECTORY=""
Expand Down Expand Up @@ -174,6 +175,15 @@ gemstone::prepare_stone() {
fi
createStone.solo --registry=$STONES_REGISTRY_NAME --template=default_tode \
--start $STONE_NAME ${gemstone_version} $GEMSTONE_DEBUG
if [ "$STONES_DISABLENATIVECODE" = "true" ] && [ $vers = "3.7.0" ] && [ "$PLATFORM" = "Darwin"* ]; then
pushd $STONE_DIRECTORY
# on Darwin, it is necessary to disable native code when using 3.7.0 in certain cases, especially on github
echo "DISABLING NATIVE CODE"
cat -- >> gem.conf << EOF
GEM_NATIVE_CODE_ENABLED = 0;
EOF
popd
fi
fi
STONE_STARTED="TRUE"
if [ "$loadTode" = "true" ] ; then
Expand Down Expand Up @@ -359,6 +369,9 @@ gemstone::parse_options() {
STONES_GSDEVKITSTONES_ROOT="${1#*=}"
shift
;;
--gs-DISABLENATIVECODE)
STONES_DISABLENATIVECODE="true"
shift
--gs-*)
print_error_and_exit "Unknown GemStone-specific option: $1"
;;
Expand Down
4 changes: 4 additions & 0 deletions helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ print_help() {
--gs-DEBUG Enable remote debugging of GsDevKit_stones .solo scripts
via topaz DEBUGGEM command.
--gs-DISABLENATIVECODE
Disable use of native code in GemStone gems when running 3.7.0
on Darwin. Noop when running on non-Darwin hosts. Related
to https://gemtalksystems.com/data/bugnotes/41550.html.
--gs-REGISTRY=<registry-name>
If not specified, a private registry will be created and
populated. If specified, \$STONES_DATA_HOME and \$STONES_HOME
Expand Down

0 comments on commit 299caf4

Please sign in to comment.