Reimplement All as benchmark #126
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, pull_request] | |
jobs: | |
test_soms: | |
runs-on: ubuntu-20.04 # ubuntu-latest | |
continue-on-error: ${{ matrix.not-up-to-date }} | |
strategy: | |
fail-fast: false # we want all jobs to run, because they may fail independently | |
matrix: | |
include: | |
# - name: SOM++ | |
# repo: SOMpp.git | |
# apt: libcppunit-dev | |
# build: "cmake . && make SOM++" | |
# som: "./som.sh" | |
# not-up-to-date: true | |
# - name: CSOM | |
# repo: CSOM.git | |
# build: | | |
# export COMPILER=gcc | |
# export ARCH=64bit | |
# make | |
# som: "./som.sh" | |
# not-up-to-date: true | |
- name: JsSOM | |
repo: JsSOM.git | |
build: "" | |
som: "./som.sh" | |
not-up-to-date: true | |
- name: PySOM | |
repo: PySOM.git | |
som: "PYTHON=python SOM_INTERP=BC ./som.sh" | |
not-up-to-date: false | |
- name: SOM (Java) | |
build: make | |
som: ./som.sh | |
repo: som-java.git | |
not-up-to-date: false | |
- name: TruffleSOM | |
repo: TruffleSOM.git | |
build: | | |
export JAVA_HOME=$JAVA_HOME_17_X64 | |
./som --setup mx | |
export PATH=$PATH:`pwd`/../mx | |
./som --setup labsjdk | |
mx sforceimport | |
rm libs/jvmci || true | |
./som --setup labsjdk | |
mx build | |
som: "JAVA_HOME=$JAVA_HOME_17_X64 ./som -G" | |
not-up-to-date: false | |
- name: Specification Tests | |
som: spec | |
not-up-to-date: false | |
- name: SOM-RS | |
repo: som-rs.git | |
build: "cargo build --release -p som-interpreter-bc" | |
som: "./target/release/som-interpreter-bc" | |
som-tests: " -c ../Smalltalk ../TestSuite -- TestHarness" | |
not-up-to-date: false | |
# - name: ykSOM | |
# repo: yksom.git | |
# build: "cargo build" | |
# som: "cargo run -- " | |
# som-tests: "--cp ../Smalltalk ../TestSuite/TestHarness.som" | |
# not-up-to-date: true | |
name: ${{ matrix.name }} | |
steps: | |
- name: Checkout SOM Repository | |
uses: actions/checkout@v4 | |
- name: Checkout SOM VM Repository | |
if: matrix.som != 'spec' | |
run: | | |
set +e # Disable early abort in Bash | |
export BRANCH_NAME=${GITHUB_REF##*/} | |
export GITHUB_USER=${{ github.actor }} | |
export PR_TARGET_USER=${{ github.repository_owner }} | |
export REPO=${{ matrix.repo }} | |
GIT_CMDS=( | |
"git clone --branch $BRANCH_NAME --depth 1 https://github.com/$GITHUB_USER/$REPO som-vm" | |
) | |
if [ ! -z "${{ github.head_ref }}" ] | |
then | |
GIT_CMDS+=( | |
"git clone --branch ${{ github.head_ref }} --depth 1 https://github.com/$GITHUB_USER/$REPO som-vm" | |
) | |
fi | |
GIT_CMDS+=( | |
"git clone --depth 1 https://github.com/$GITHUB_USER/$REPO som-vm" | |
"git clone --depth 1 https://github.com/$PR_TARGET_USER/$REPO som-vm" | |
) | |
for ((i = 0; i < ${#GIT_CMDS[@]}; i++)) | |
do | |
echo "" | |
echo "" | |
echo "Attempting: ${GIT_CMDS[$i]}" | |
echo "" | |
eval "${GIT_CMDS[$i]}" | |
if [ $? -eq 0 ] | |
then | |
echo "" | |
echo "Clone succeeded" | |
break | |
fi | |
done | |
- name: Install Apt Packages | |
if: ${{ matrix.apt != '' }} | |
run: | | |
sudo apt-get install ${{ matrix.apt }} | |
- name: Test Specification | |
if: ${{ matrix.som == 'spec' }} | |
run: | | |
cd specification | |
make test | |
- name: Check Whether Basic Interpreter Tests are Up to Date | |
if: ${{ matrix.som == 'spec' }} | |
run: | | |
./TestSuite/BasicInterpreterTests/number-of-tests.sh | |
- name: Build SOM VM | |
if: ${{ matrix.som != 'spec' }} | |
run: | | |
export ST_DIR=`pwd`/Smalltalk | |
cd som-vm | |
git --no-pager log -n 1 | |
echo Build ${{ matrix.repo }} | |
${{ matrix.build }} | |
- name: Run Tests on SOM VM | |
if: ${{ matrix.som != 'spec' }} | |
run: | | |
cd som-vm | |
if [ "${{ matrix.som-tests }}" == "" ] | |
then | |
# The default settings for running the test harness, supported by most SOM VMs | |
export SOM_TESTS="-cp ../Smalltalk ../TestSuite/TestHarness.som" | |
else | |
export SOM_TESTS="${{ matrix.som-tests }}" | |
fi | |
echo "${{ matrix.som }} $SOM_TESTS" | |
eval "${{ matrix.som }} $SOM_TESTS" | |
# We currently test SomSom only on TruffleSOM | |
- name: Test SomSom on TruffleSOM | |
if: ${{ matrix.repo == 'TruffleSOM.git' }} | |
run: | | |
cd som-vm | |
${{ matrix.som }} -cp ../Smalltalk:../TestSuite:../SomSom/src/compiler:../SomSom/src/interpreter:../SomSom/src/primitives:../SomSom/src/vm:../SomSom/src/vmobjects ../SomSom/tests/SomSomTests.som | |
- name: Test Unit Test Benchmark | |
if: ${{ matrix.repo == 'som-java.git' }} | |
run: | | |
cd Examples/Benchmarks/TestSuite | |
./duplicate-tests.sh | |
cd ../../../som-vm | |
${{ matrix.som }} -cp ../Smalltalk:../TestSuite ../Examples/Benchmarks/TestSuite/TestTestSuite.som | |
${{ matrix.som }} -cp ../Smalltalk:../Examples/Benchmarks/TestSuite ../Examples/Benchmarks/BenchmarkHarness.som --gc TestGC100 1 1 | |
${{ matrix.som }} -cp ../Smalltalk:../Examples/Benchmarks/TestSuite ../Examples/Benchmarks/BenchmarkHarness.som Test100 1 1 |