diff --git a/.circleci/script/gen_ci.clj b/.circleci/script/gen_ci.clj index dee3fe60..5ba9ce5e 100644 --- a/.circleci/script/gen_ci.clj +++ b/.circleci/script/gen_ci.clj @@ -170,9 +170,10 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl (str base-install-cmd "\nsudo -E script/setup-musl") base-install-cmd))) (run "Download GraalVM" "script/install-graalvm") + (run "Download iprof" "curl -sLO 'https://github.com/babashka/pgo-profiles/releases/download/2023.09.27/default.iprof'") (run "Build binary" (if (= "aarch64" arch) - "script/uberjar\nscript/compile -H:PageSize=64K" - "script/uberjar\nscript/compile") "30m") + "script/uberjar\nscript/compile -H:PageSize=64K --pgo=default.iprof" + "script/uberjar\nscript/compile --pgo=default.iprof") "30m") (run "Run tests" "script/test\nscript/run_lib_tests") (run "Release" ".circleci/script/release") {:persist_to_workspace {:root "/tmp" diff --git a/.cirrus.yml b/.cirrus.yml index 2c9f9700..4fb8ebc4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -25,7 +25,8 @@ task: java -version script/uberjar - script/compile + curl -sLO 'https://github.com/babashka/pgo-profiles/releases/download/2023.09.27/default.iprof' + script/compile --pgo=default.iprof # script/test # script/run_lib_tests diff --git a/.gitignore b/.gitignore index ae6b5d4a..b5cf81da 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ target .nrepl-port .DS_Store .portal +default.iprof diff --git a/appveyor.yml b/appveyor.yml index 49a27c2f..be3a9918 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,6 +41,8 @@ build_script: - cmd: >- powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://download.oracle.com/graalvm/21/archive/graalvm-jdk-21_windows-x64_bin.zip', 'graalvm.zip') }" + powershell -Command "if (Test-Path('iprof.default')) { return } else { (New-Object Net.WebClient).DownloadFile('https://github.com/babashka/pgo-profiles/releases/download/2023.09.27/default.iprof', 'default.iprof') }" + powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }" - cmd: >- @@ -58,7 +60,7 @@ build_script: - cmd: >- call script/uberjar.bat - call script/compile.bat + call script/compile.bat --pgo=default.iprof echo Creating zip archive diff --git a/script/compile.bat b/script/compile.bat index 5a257676..db34b98a 100644 --- a/script/compile.bat +++ b/script/compile.bat @@ -32,7 +32,8 @@ call %GRAALVM_HOME%\bin\native-image.cmd ^ "--enable-preview" ^ "--install-exit-handlers" ^ "-O1" ^ - "%BABASHKA_XMX%" + "%BABASHKA_XMX%" ^ + %* if %errorlevel% neq 0 exit /b %errorlevel%