Dumps: Update for any? turtles-on ...
optimization
#337
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: build-and-test | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
SBT_OPTS: -Dsbt.log.noformat=true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ 'pull_request' != github.event_name || (github.event.pull_request.head.repo.git_url != github.event.pull_request.base.repo.git_url) }} | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.2.0' | |
java-version: '17' | |
- name: Install Graal.js | |
run: | | |
gu install js | |
echo "GRAAL_HOME=$GRAALVM_HOME" >> $GITHUB_ENV | |
# Node.js setup should come after GraalVM setup as GraalVM includes a conflicting `node` binary | |
# and we want the "regular" node version to "win". -Jeremy B June 2021 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: engine/package-lock.json | |
- name: Git Init | |
run: git submodule update --init --recursive | |
- name: Environment Info | |
run: | | |
./sbt.sh version | |
echo "** PATH" | |
echo $PATH | |
echo "** node path and version" | |
readlink -f `which node` | |
node --version | |
echo "** JAVA_HOME" | |
echo $JAVA_HOME | |
echo "** GRAAL_HOME" | |
echo $GRAAL_HOME | |
echo "** java path and version" | |
readlink -f `which java` | |
java -version | |
echo "** javac path and version" | |
readlink -f `which javac` | |
javac -version | |
- name: Compile All | |
run: | | |
./sbt.sh "compilerJVM / Test / compile" | |
./sbt.sh "compilerJS / Test / compile" | |
./sbt.sh "netLogoWeb / Test / compile" | |
./sbt.sh "netLogoWeb / Test / runMain org.nlogo.tortoise.nlw.ExtensionsUpdater" | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
lint: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.2.0' | |
java-version: '17' | |
- name: Install Graal.js | |
run: | | |
gu install js | |
echo "GRAAL_HOME=$GRAALVM_HOME" >> $GITHUB_ENV | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: engine/package-lock.json | |
- name: Scalastyle | |
run: | | |
./sbt.sh netLogoWeb/scalastyle compilerCore/scalastyle compilerJVM/scalastyle compilerJS/scalastyle macrosCore/scalastyle | |
- name: Coffeelint | |
run: | | |
./sbt.sh engine/coffeelint | |
test-compiler: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.2.0' | |
java-version: '17' | |
- name: Install Graal.js | |
run: | | |
gu install js | |
echo "GRAAL_HOME=$GRAALVM_HOME" >> $GITHUB_ENV | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: engine/package-lock.json | |
- name: Compiler JVM Tests | |
run: | | |
./sbt.sh "compilerJVM / Test / test" | |
./sbt.sh "compilerJVM / depend" | |
- name: Compiler JS Tests | |
run: | | |
./sbt.sh "compilerJS / Test / test" | |
test-web-fast: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.2.0' | |
java-version: '17' | |
- name: Install Graal.js | |
run: | | |
gu install js | |
echo "GRAAL_HOME=$GRAALVM_HOME" >> $GITHUB_ENV | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: engine/package-lock.json | |
- name: NetLogo Web Fast Tests | |
run: | | |
./sbt.sh "netLogoWeb / Test / fast" | |
./sbt.sh "netLogoWeb / testOnly *TestReporters" | |
test-web-commands: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.2.0' | |
java-version: '17' | |
- name: Install Graal.js | |
run: | | |
gu install js | |
echo "GRAAL_HOME=$GRAALVM_HOME" >> $GITHUB_ENV | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: engine/package-lock.json | |
- name: NetLogo Web Command Tests | |
run: | | |
./sbt.sh "netLogoWeb / testOnly *TestCommands" | |
test-dumps: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.2.0' | |
java-version: '17' | |
- name: Install Graal.js | |
run: | | |
gu install js | |
echo "GRAAL_HOME=$GRAALVM_HOME" >> $GITHUB_ENV | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: engine/package-lock.json | |
- name: Model JS Dumps | |
run: | | |
./sbt.sh "netLogoWeb / testOnly *ModelDumpTests" | |
test-models: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
test: ["-z 0 -z 1", "-z 2", "-z 3", "-z 4", "-z 5", "-z 6", "-z 7", "-z 8", "-z 9"] | |
steps: | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.2.0' | |
java-version: '17' | |
- name: Install Graal.js | |
run: | | |
gu install js | |
echo "GRAAL_HOME=$GRAALVM_HOME" >> $GITHUB_ENV | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: engine/package-lock.json | |
- name: Model Docking Tests ${{ matrix.test }} | |
run: ./sbt.sh "netLogoWeb / testOnly *TestModels -- ${{ matrix.test }}" |