Skip to content

the hole was too deep... we found the Balrog of 100MB limit on PyPi t… #9420

the hole was too deep... we found the Balrog of 100MB limit on PyPi t…

the hole was too deep... we found the Balrog of 100MB limit on PyPi t… #9420

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
tags-ignore:
- '**'
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
# Avoid building if only modifying non-code files.
# An exception is docs/options.md , as created from build
paths:
- "**"
- '!pypi-distribution/**'
- '!scripts/**'
- '!version.py'
- '!makeExecutable.sh'
- '!buildAll.sh'
- '!README.md'
- '!LICENSE'
- '!.gitignore'
- '!docs/**'
- '!release_notes.md'
- '!outdated/**'
- 'docs/options.md'
### Unfortunately, had to disable this. Originally added to be able to run CI from PRs from forks (eg from external people).
### But this leads to run CI 2 twice on each push on an open PR, regardless of fork.
### It seems there is no solution for this:
### https://github.com/orgs/community/discussions/26276
# pull_request:
# branches:
# - "**"
env:
evomaster-version: 5.2.1
# Unfortunately, to use JPackage we need JDK 17 or above :(
# Which is really bad due to the madness of --add-opens.
# Even if hunt down all cases of reflections in EM, there is still the problem of
# third-party libraries, which might do it only in special cases.
# For some "hilarious" case, see:
# https://github.com/WebFuzzing/EvoMaster/issues/447
release-jdk: 21
build-jdk: 17
java-distribution: temurin
retention-days: 5
debug: false # put to true if need to debug a specific test
debugTestName: "GeneRandomizedTest" # replace with test to debug
# This build is quite expensive (some hours), so we run it whole only on some JVM versions and OSs.
# For the moment, we need to support JVM 8 and all following LTS versions (e.g, 11 and 17).
# EM should run an all OSs. As our main development machines are Windows and Mac, just
# testing whole build with all E2E only on Linux should be fine.
jobs:
setup:
# what a mess... GA does not allow to refer to "env" in "if" for a job (but can for a step).
# so we have to go through this convoluted approach of first running a job that set a variable
# via console output...
runs-on: ubuntu-latest
outputs:
debug: ${{ steps.set-output.outputs.debug }}
steps:
- name: Set skip-jobs variable
id: set-output
run: echo "debug=${{ env.debug }}" >> $GITHUB_OUTPUT
- name: Verify Docker is working fine
run: |
timeout 30s bash -c 'until docker info; do sleep 1; done'
docker version
docker info
debug:
runs-on: ubuntu-latest
needs: setup
if: needs.setup.outputs.debug == 'true'
steps:
- uses: actions/checkout@v6
- name: Setup JDK ${{env.build-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.build-jdk}}
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Debug Test Case
env:
CI_env: GithubAction
run: mvn -B install -Dtest=${{env.debugTestName}} -Dsurefire.failIfNoSpecifiedTests=false -DredirectTestOutputToFile=false
full-build-base:
runs-on: ubuntu-latest
needs: setup
if: needs.setup.outputs.debug == 'false'
steps:
# Checkout code
- uses: actions/checkout@v6
# Build/test for JDK
- name: Setup JDK ${{env.build-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.build-jdk}}
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
# the set command makes the build fail if mvn command fails (no change in behavior)
run: |
set -o pipefail
mvn clean verify --fae 2>&1 | tee full-build-base.log
env:
CI_env: GithubAction
- name: Upload full-build-base log for metrics job
if: success()
uses: actions/upload-artifact@v7
with:
name: full-build-base-log-current
path: full-build-base.log
retention-days: 1
if-no-files-found: error
- name: Upload evomaster.jar
uses: actions/upload-artifact@v7
with:
name: evomaster.jar
path: core/target/evomaster.jar
retention-days: ${{env.retention-days}}
if-no-files-found: error
# Make test report accessible from GitHub Actions (as Maven logs are long)
- name: Publish Test Report
if: success() || failure()
uses: mikepenz/action-junit-report@v6
env:
NODE_OPTIONS: "--max_old_space_size=9000"
with:
report_paths: '**/target/*-reports/TEST-*.xml'
# Upload coverage results
# As of 2024, looks like a rate limiter is breaking the build.
# As such, now we only upload from master branch, hoping it is enough.
# If not, might have to remove this
- if: github.ref == 'refs/heads/master'
name: Upload coverage to CodeCov
run: curl -s https://codecov.io/bash | bash
- if: github.ref != 'refs/heads/master'
name: Uploading coverage to CodeCov is done only on 'master' branch builds
run: echo Skipping upload to CodeCov
full-build-metrics:
runs-on: ubuntu-latest
needs: full-build-base
if: needs.full-build-base.result == 'success'
steps:
- uses: actions/checkout@v6
- name: Download full-build-base log
uses: actions/download-artifact@v8
with:
name: full-build-base-log-current
path: .
- name: Analyze and persist full-build-base metrics
continue-on-error: true
uses: ./.github/actions/full-build-metrics
with:
log-file: full-build-base.log
artifact-name: full-build-base-metrics
baseline-branch: master
workflow-file: ci.yml
#These metrics occupy very little space, increasing the retention so they are not lost if nothing is merged to master in a while
retention-days: 90
base-build-mac:
runs-on: macos-latest
needs: setup
if: needs.setup.outputs.debug == 'false'
steps:
- uses: actions/checkout@v6
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.release-jdk}}
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean verify -DskipTests
env:
CI_env: GithubAction
base-build-windows:
runs-on: windows-latest
needs: setup
if: needs.setup.outputs.debug == 'false'
steps:
- uses: actions/checkout@v6
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.release-jdk}}
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean verify -DskipTests
env:
CI_env: GithubAction
# NOTES we know try to be on latest LTS
# full-build-LTS:
# # run on a different OS from main build.
# # It would had been good, but does not work due to Docker support :( see:
# # https://stackoverflow.com/questions/66077884/testcontainers-in-windows-environment-on-github-actions-could-not-find-a-valid
# # TODO check this again in the future
# # runs-on: windows-latest
# runs-on: ubuntu-latest
# needs: setup
# if: needs.setup.outputs.debug == 'false'
# steps:
# - uses: actions/checkout@v4
# - name: Setup JDK ${{env.latest-jdk}}
# uses: actions/setup-java@v5
# with:
# java-version: ${{env.latest-jdk}}
# distribution: 'temurin'
# - name: Cache Maven packages
# uses: actions/cache@v3
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
# - name: Build with Maven
# run: mvn clean verify --fae
# env:
# CI_env: GithubAction
# MAVEN_OPTS: "--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED"
installer-for-windows:
needs: full-build-base
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v8
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh WINDOWS
- name: Upload installation file
uses: actions/upload-artifact@v7
with:
name: evomaster.msi
path: release/evomaster-${{env.evomaster-version}}.msi
retention-days: ${{env.retention-days}}
if-no-files-found: error
installer-for-osx:
needs: full-build-base
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v8
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh OSX
- name: Upload installation file
uses: actions/upload-artifact@v7
with:
name: evomaster.dmg
path: release/evomaster-${{env.evomaster-version}}.dmg
retention-days: ${{env.retention-days}}
if-no-files-found: error
installer-for-debian:
needs: full-build-base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v8
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh DEBIAN
- name: Check generated files
shell: bash
run: ls -l release
- name: Upload installation file
uses: actions/upload-artifact@v7
with:
name: evomaster.deb
# JDK 17 and 21 use different suffixes... doesn't seem configurable :(
# path: release/evomaster_${{env.evomaster-version}}-1_amd64.deb
path: release/evomaster_${{env.evomaster-version}}_amd64.deb
retention-days: ${{env.retention-days}}
if-no-files-found: error
test-utils-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- run: npm ci
working-directory: ./test-utils/test-utils-js
- run: npm test
working-directory: ./test-utils/test-utils-js
test-utils-py:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
working-directory: ./test-utils/test-utils-py
run: |
python -m pip install --upgrade pip
pip install -r ./src/main/resources/requirements.txt
- name: Test with unittest
working-directory: ./test-utils/test-utils-py
run: python -m unittest discover -s ./src/test/ -p '*_test.py'
bb-on-different-os:
strategy:
matrix:
# main build is already on ubuntu-latest
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: setup
if: needs.setup.outputs.debug == 'false'
steps:
- uses: actions/checkout@v6
- name: Setup JDK ${{env.build-jdk}}
uses: actions/setup-java@v5
with:
distribution: ${{env.java-distribution}}
java-version: ${{env.build-jdk}}
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean install -DskipTests
env:
CI_env: GithubAction
- name: Run BB E2E tests
# important that what we run here does not use Docker
working-directory: core-tests/e2e-tests/spring/spring-rest-bb
run: mvn clean verify --fae
env:
CI_env: GithubAction