### Start netldi for smalltalkci_ldi Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Starts the GemStone netldi process for the smalltalkci_ldi network, logging to logs/netldi.log. ```shell startnetldi -g -a dhenrich smalltalkci_ldi -P 36083 -l logs/netldi.log ``` -------------------------------- ### Start GemStone stone with system.conf Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Starts the GemStone stone named 'smalltalkci' using the system.conf configuration, logging to logs/smalltalkci.log. ```shell startstone -e system.conf -z system.conf -l logs/smalltalkci.log smalltalkci ``` -------------------------------- ### Start client simply Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Starts the Pharo client without any additional options. This is a simpler alternative to the previous command, useful when you don't need to force a fresh load. ```bash startClient seaside_Pharo4.0 ``` -------------------------------- ### Start stone and tODE client Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Starts the 'travis' stone and brings up a tODE client after a local run with test failures. SmalltalkCI stops the stone after a run, so you must first start the stone and bring a tODE client. ```shell startStone -b travis startClient tode ``` -------------------------------- ### List of installed clients from $GS_HOME/bin/clients Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Output of the client list command showing installed travis clients for Pharo5.0 and Pharo4.0, plus the tode client. ```text Installed Clients: travisClient_Pharo5.0 travisClient_Pharo5.0.image (client) travisClient_Pharo4.0 travisClient_Pharo4.0.image (client) tode todeClient.image (client) ``` -------------------------------- ### SmalltalkCISpec .smalltalk.ston configuration example Source: https://github.com/hpi-swa/smalltalkci/blob/master/README.md Example of a valid .smalltalk.ston file structure for smalltalkCI. The file must contain a single SmalltalkCISpec object with optional #name, #loading, and #testing keys. The #loading key holds a list of load specifications, and #testing holds test case selection settings. ```javascript SmalltalkCISpec { #name : 'My Name', // Name of the SmalltalkCISpec (optional) #loading : [ // List Of Load Specifications... ], #testing : { // TestCase Selection... } } ``` -------------------------------- ### SmalltalkCI SCIGemStoneServerConfigSpec example .smalltalk.ston Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Example .smalltalk.ston file configuring a GemStone server stone for SmalltalkCI. It sets the default session name, stone and gem configuration paths, time zone, and loads the GemStoneGCI baseline with the GsDevKit and Tests groups. ```ston SmalltalkCISpec { #specName : 'GemStoneGCI', #configuring : [ SCIGemStoneServerConfigSpec { #defaultSessionName : 'gciTest', #stoneConfPath : 'gemstone/stone.conf', #gemConfPath : 'gemstone/gem.conf', #timeZone : 'UTC', #platforms : [ #gemstone, #gemstoneClient ] } ], #loading : [ SCIMetacelloLoadSpec { #baseline : 'GemStoneGCI', #load : [ 'GsDevKit', 'Tests' ], #directory : 'repository', #platforms : [ #gemstone, #pharo ] } ] } } ``` -------------------------------- ### GitLab CI configuration for running tests and extracting coverage Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md Example .gitlab-ci.yml configuration that runs smalltalkCI tests and then uses a Python image to convert LCOV to Cobertura XML. The first job runs tests and stores coverage as an artifact; the second job installs lcov-cobertura-fix and converts the LCOV file to coverage.xml. ```yaml image: hpiswa/smalltalkci variables: COVERAGE_DIR: /builds/yourproject/coverage stages: - test - coverage run tests: stage: test script: smalltalkci -s "Pharo64-9.0" artifacts: paths: - $COVERAGE_DIR extract coverage: stage: coverage image: python:3.9-slim-buster script: - pip install lcov-cobertura-fix==1.6.1a2 - lcov_cobertura $COVERAGE_DIR/lcov.info --output $COVERAGE_DIR/coverage.xml dependencies: - run tests artifacts: reports: cobertura: $COVERAGE_DIR/coverage.xml ``` -------------------------------- ### Travis CI Template (.travis.yml) Source: https://github.com/hpi-swa/smalltalkci/blob/master/README.md Travis CI configuration for smalltalkCI with a build matrix of Smalltalk images. Includes commented-out examples for customizing the script and enabling caching for GemStone builds. ```yml language: smalltalk sudo: false # Select operating system(s) os: - linux - osx # Select compatible Smalltalk image(s) smalltalk: - Squeak64-trunk - Squeak64-5.1 - Squeak32-4.6 - Squeak32-4.5 # ... - Pharo64-alpha - Pharo64-stable - Pharo64-13 - Pharo64-12 # ... - Pharo32-alpha - Pharo32-stable - Pharo32-6.1 # ... - GemStone64-3.5.3 - GemStone64-3.6.0 - GemStone64-3.6.5 # ... # Override `script` to customize smalltalkCI invocation, e.g.: #script: # - smalltalkci .mysmalltalk1.ston # - travis_wait smalltalkci .mysmalltalk2.ston # Uncomment to enable caching (only useful for GemStone builds (3x faster)) #cache: # directories: # - $SMALLTALK_CI_CACHE ``` -------------------------------- ### Run CI builds using a snapshot Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Runs CI builds using a previously created snapshot as the starting point. The -t flag specifies the snapshot file to use as the initial extent. ```shell smalltalkCI -r -t $GS_HOME/server/stones/ci_329/snapshots/extent0.gemstone_gci.dbf -z $GS_HOME/shared/repos/GemStone-GCI/.smalltalk.ston ci_329 ``` -------------------------------- ### Travis CI with Multiple Configurations (.travis.yml) Source: https://github.com/hpi-swa/smalltalkci/blob/master/README.md Expands the Travis build matrix using the smalltalk_config key to reference additional smalltalkCI configuration files. The example shows a matrix with Squeak and Pharo images and a separate .bleedingEdge.ston config. ```yml language: smalltalk sudo: false os: osx smalltalk: - Squeak32-5.1 - Pharo32-6.0 matrix: include: - smalltalk: Squeak64-trunk smalltalk_config: .bleedingEdge.ston - smalltalk: Pharo64-alpha smalltalk_config: .bleedingEdge.ston allow_failures: # Allow bleeding edge builds to fail - smalltalk_config: .bleedingEdge.ston ``` -------------------------------- ### Create a snapshot with project loaded Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Creates a snapshot of the stone's extent after loading the project, which can be used as a starting point for faster CI builds. The first command runs smalltalkCI to load the project, and the second creates a snapshot named gemstone_gci.dbf. ```shell smalltalkCI -z $GS_HOME/shared/repos/GemStone-GCI/.smalltalk.ston ci_329 todeIt ci_329 bu snapshot gemstone_gci.dbf ``` -------------------------------- ### Basic appveyor.yml template for SmalltalkCI Source: https://github.com/hpi-swa/smalltalkci/blob/master/README.md Use this AppVeyor configuration to run SmalltalkCI on a 64-bit Windows environment with Cygwin. It defines environment variables for Cygwin paths and a build matrix of Smalltalk images (Squeak64 and Pharo64). The install step downloads and extracts smalltalkCI, and the test script runs smalltalkci via Cygwin bash. ```yaml # This is a 64-bit environment, so use 64-bit Cygwin environment: CYG_ROOT: C:\cygwin64 CYG_BASH: C:\cygwin64\bin\bash CYG_CACHE: C:\cygwin64\var\cache\setup CYG_EXE: C:\cygwin64\setup-x86_64.exe CYG_MIRROR: http://cygwin.mirror.constant.com SCI_RUN: /cygdrive/c/smalltalkCI-master/bin/smalltalkci matrix: # Currently, only Squeak and Pharo images are supported on AppVeyor. - SMALLTALK: Squeak64-trunk - SMALLTALK: Squeak64-5.0 - SMALLTALK: Pharo64-alpha - SMALLTALK: Pharo64-6.0 # ... platform: - x64 install: - '%CYG_EXE% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P unzip' - ps: Start-FileDownload "https://github.com/hpi-swa/smalltalkCI/archive/master.zip" "C:\smalltalkCI.zip" - 7z x C:\smalltalkCI.zip -oC:\ -y > NULL build: false test_script: - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 NULL build: false test_script: - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 with a supported image name and provide the path to your project's .smalltalk.ston file. On Windows, run from a Bash shell like Git Bash, Cygwin, MinGW, or MSYS2. ```bash bin/smalltalkci -s --headful /path/to/your/project/.smalltalk.ston ``` -------------------------------- ### Configure coverage testing in .smalltalk.ston Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md Add this #coverage dictionary to the #testing slot of your .smalltalk.ston to enable coverage testing. The #format option defaults to #coveralls and can be set to #lcov. If multiple of #packages, #classes, and #categories are provided, the union of all matched methods is used. ```javascript SmalltalkCISpec { ... #testing : { ... #coverage : { #packages : [ 'SomePackage', 'SomePack*' ], #classes : [ #ClassToCover ], #categories : [ 'SomeClassCategory', 'SomeClassCat*' ], #format : #coveralls } } } ``` -------------------------------- ### Create a fresh client for CI Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Deletes an existing client if present and creates a new one for a fresh build. The -t flag specifies the client type (pharo), -v the version, and -z the project configuration file. ```shell deleteClient gci_Pharo5.0 # start from a fresh installation if gci_Pharo5.0 already exists createClient -t pharo gci_Pharo5.0 -v Pharo5.0 -z $GS_HOME/shared/repos/GemStone-GCI/.smalltalk.ston ``` -------------------------------- ### Copy extent0_step_1.dbf to extent0.dbf Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Copies a step 1 extent file over the current extent0.dbf. ```shell cp extent0_step_1.dbf extent0.dbf. ``` -------------------------------- ### Copy extent0_step_2.dbf to extent0.dbf Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Copies a step 2 extent file over the current extent0.dbf. ```shell cp extent0_step_2.dbf extent0.dbf. ``` -------------------------------- ### Run client tests Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Runs the client tests in the Pharo client. The -f flag forces a fresh load of the code, -z points to the project's .smalltalk.ston file, -r indicates a run, and -t specifies the test suite. ```bash startClient seaside_Pharo4.0 -f -z $GS_HOME/shared/repos/Seaside/.smalltalk.ston -r -t seaside_test ``` -------------------------------- ### Run server tests Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Runs the server tests using the snapshot with CI tests loaded. The -r flag indicates a run, and -t specifies the target image. This command should be used every time you want to run the server CI tests. ```bash smalltalkCI -r -t $GS_HOME/server/stones/seaside32_330/snapshots/extent0.seaside32_ci.dbf -z $GS_HOME/shared/repos/Seaside/.smalltalk.ston seaside32_330 ``` -------------------------------- ### Copy extent0_step_3.dbf to extent0.dbf Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Copies a step 3 extent file over the current extent0.dbf. ```shell cp extent0_step_3.dbf extent0.dbf. ``` -------------------------------- ### Snapshot before loading CI tests Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Takes a snapshot of the Seaside stone before the CI tests are loaded. This creates a baseline for comparison. ```bash todeIt seaside32_330 bu snapshot seaside32.dbf ``` -------------------------------- ### Copy GemStone extent0.seaside.dbf to extent0.dbf and make writable Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Copies the base GemStone extent file to the working extent0.dbf and makes it writable for the stone. ```shell cp $GEMSTONE/bin/extent0.seaside.dbf extent0.dbf; chmod +w extent0.dbf ``` -------------------------------- ### smalltalkCI Custom Scripts Configuration Source: https://github.com/hpi-swa/smalltalkci/blob/master/README.md Run custom scripts before and after loading and testing phases using #preLoading, #postLoading, #preTesting, and #postTesting. Supports SCICustomScript for platform-specific scripts. ```javascript SmalltalkCISpec { #preLoading : 'scripts/preLoading.st', #loading : ..., #postLoading : [ 'scripts/postLoading1.st', 'scripts/postLoading2.st' ], #preTesting : SCICustomScript { #path : 'scripts/preTesting.st', #platforms : [ #squeak, #pharo, #gemstone ] }, #testing : ..., #postTesting : [ SCICustomScript { #path : 'scripts/postTestingSqueak.st', #platforms : [ #squeak ] }, SCICustomScript { #path : 'scripts/postTestingPharo.st', #platforms : [ #pharo ] } ] } ``` -------------------------------- ### Clone the Seaside repository Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Clones the Seaside repository and checks out the dev/3.2 branch. This is the first step in setting up the development environment. ```bash cd $GS_HOME/shared/repos git clone https://github.com/SeasideSt/Seaside.git cd Seaside git checkout dev/3.2 ``` -------------------------------- ### Copy extent0_step_4.dbf to extent0.dbf Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Copies a step 4 extent file over the current extent0.dbf. ```shell cp extent0_step_4.dbf extent0.dbf. ``` -------------------------------- ### Load Tode into stone Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Loads Tode (tODE) into the running stone. ```shell loadTode.stone -D ``` -------------------------------- ### GitLab CI Template (.gitlab-ci.yml) Source: https://github.com/hpi-swa/smalltalkci/blob/master/README.md GitLab CI configuration using the hpiswa/smalltalkci Docker image. Defines jobs for Squeak and Pharo images, each running the smalltalkci command with a specific Smalltalk selector. ```yml image: hpiswa/smalltalkci Squeak64Trunk: script: smalltalkci -s "Squeak64-trunk" Squeak325.1: script: smalltalkci -s "Squeak32-5.1" Pharo64Alpha: script: smalltalkci -s "Pharo64-alpha" Pharo327.0: script: smalltalkci -s "Pharo32-7.0" # ... ``` -------------------------------- ### Create a dedicated stone for Seaside Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Creates a new GemStone stone named 'seaside32_330' with the specified configuration. The -u flag specifies the URL for the Seaside configuration, -i sets the image name, -l sets the load specification, and -z points to the project's .smalltalk.ston file. ```bash createStone -u http://gsdevkit.github.io/GsDevKit_home/Seaside32.ston -i Seaside3 -l Seaside3 -z $GS_HOME/shared/repos/Seaside/.smalltalk.ston seaside32_330 3.3.0 ``` -------------------------------- ### Load CI tests into the stone Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Loads the CI tests as specified by the Seaside .smalltalk.ston file into the stone. The -t flag specifies the target image, and -z points to the project's .smalltalk.ston file. ```bash smalltalkCI -t $GS_HOME/server/stones/seaside32_330/snapshots/extent0.seaside32.dbf -z $GS_HOME/shared/repos/Seaside/.smalltalk.ston seaside32_330 ``` -------------------------------- ### View object log continuations Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Opens the object log browser in tODE to view continuations from the last hour. Use the 'debug continuation' menu item to bring up the debugger on the continuation. ```shell ol view --continuation --age=`1 hour` ``` -------------------------------- ### Rerun tests from tODE shell Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Reruns the tests from within a tODE session using the SmalltalkCI test command with the path to the .smalltalk.ston file. ```shell eval `SmalltalkCI test: '$GS_HOME/shared/repos/tode/.smalltalk.ston'` ``` -------------------------------- ### Upload LCOV to CodeCov with bash Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md Run the CodeCov bash uploader, which is compatible with smalltalkCI's LCOV output. May need to point the uploader to the coverage file location printed by smalltalkCI. ```bash bash <(curl -s https://codecov.io/bash) ``` -------------------------------- ### smalltalkCI TestCase Selection Configuration Source: https://github.com/hpi-swa/smalltalkci/blob/master/README.md Configure which TestCases run during a build using the #testing slot. Supports include/exclude, explicit lists, and options like #allTestCases, #defaultTimeout, #failOnSCIDeprecationWarnings, #failOnZeroTests, #hidePassingTests, and #serializeError. ```javascript SmalltalkCISpec { ... #testing : { // Include specific TestCases #include : { #classes : [ #AnotherProjectTestCase ], #categories : [ 'AnotherProject-Tests' ], #packages : [ 'AnotherProject.*' ], #projects : [ 'BaselineOfMyProject' ] }, // Exclude specific TestCases from testing #exclude : { #classes : [ #AnotherProjectTestCase ], #categories : [ 'AnotherProject-Tests' ], #packages : [ 'AnotherProject.*' ], #projects : [ 'ConfigurationOfMyOtherProject' ] }, #allTestCases : true, // Run all TestCases in image // Define TestCases explicitly #classes : [ #MyProjectTestCase ], #categories : [ 'MyProject-*' ], #packages : [ 'MyProject.*' ], #projects : [ 'BaselineOfMyProject' ], // Other options #defaultTimeout : 30, // In seconds (Squeak, and Pharo 6 or later) #failOnSCIDeprecationWarnings : false, // Fail if a deprecated smalltalkCI API is used #failOnZeroTests : false, // Pass builds that did not run any tests #hidePassingTests : true, // Hide passing tests when printing to stdout #serializeError: false // (default: true) Disable serialization of failing test case (e.g. with Fuel in Pharo) } } ``` -------------------------------- ### Snapshot after loading CI tests Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/README.md Takes a snapshot of the stone after the CI tests have been loaded. This creates a snapshot with the tests available for running. ```bash todeIt seaside32_330 bu snapshot seaside32_ci.dbf ``` -------------------------------- ### CodeCov upload in Travis CI Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md Add this to .travis.yml to upload coverage to CodeCov after a successful Travis CI build. ```yml after_success: - bash <(curl -s https://codecov.io/bash) ``` -------------------------------- ### Coveralls upload in Travis CI Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md Add this to .travis.yml to upload LCOV coverage to Coveralls after a successful Travis CI build when using the LCOV output format. ```yml after_success: - npm install -g coveralls - cat "coverage/lcov.info" | coveralls ``` -------------------------------- ### Coveralls GitHub Action for parallel runs Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md Workflow for uploading and merging coverage from parallel CI runs. Each job uses a unique flag-name and sets parallel: true; a separate finish job marks the parallel upload as complete. ```yml jobs: test: runs-on: ${{ matrix.os }} strategy: matrix: smalltalk: [ Squeak64-trunk, Squeak64-5.3 ] os: [ ubuntu-latest, macos-latest ] name: ${{ matrix.smalltalk }} on ${{ matrix.os }} steps: # ... Checkout project, run smalltalkCI ... - name: Coveralls GitHub Action uses: coverallsapp/github-action@v1.1.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} # This name must be unique for each job flag-name: ${{matrix.os}}-${{matrix.smalltalk}} parallel: true finish: needs: test runs-on: ubuntu-latest steps: - name: Coveralls Finished uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }} parallel-finished: true ``` -------------------------------- ### Find LCOV output file location Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md This line appears in smalltalkCI's output when the LCOV coverage file is written. Use it to locate the coverage file if it is not in the expected location. ```shell Writing LCOV coverage info to: /path/to/coverage/lcov.info ``` -------------------------------- ### Coveralls GitHub Action for single job Source: https://github.com/hpi-swa/smalltalkci/blob/master/docs/COVERAGE.md Add this step to a GitHub Actions workflow to upload coverage to Coveralls. The action uses the provided GitHub token. ```yml jobs: test: # ... steps: # ... Checkout project, run smalltalkCI ... - name: Coveralls GitHub Action uses: coverallsapp/github-action@v1.1.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} ``` -------------------------------- ### Stop GemStone stone Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Stops the running GemStone stone named 'smalltalkci' using the DataCurator user with the swordfish password. ```shell stopstone smalltalkci DataCurator swordfish ``` -------------------------------- ### Remove transaction log files Source: https://github.com/hpi-swa/smalltalkci/blob/master/gemstone/doc.txt Removes all transaction log files in the current directory. ```shell rm -rf tranlog*.* ```