diff --git a/.circleci/script/gen_ci.clj b/.circleci/script/gen_ci.clj index 6ae191af..7f22e4af 100644 --- a/.circleci/script/gen_ci.clj +++ b/.circleci/script/gen_ci.clj @@ -179,10 +179,11 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl (run "Build binary" (if (= "aarch64" arch) "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" :paths ["release"]}} + (run "Run tests" "script/test\nscript/run_lib_tests") + (run "Release + publish" "BABASHKA_PUBLISH=true .circleci/script/release") {:save_cache {:paths ["~/.m2" "~/graalvm"] :key cache-key}} diff --git a/.circleci/script/release b/.circleci/script/release index 05f90205..f5c5b5d7 100755 --- a/.circleci/script/release +++ b/.circleci/script/release @@ -29,7 +29,9 @@ tar zcvf "$archive" bb # bbk cd - -./bb --config .build/bb.edn --deps-root . release-artifact "/tmp/release/$archive" +if [ "$BABASHKA_RELEASE" = "true" ]; then + ./bb --config .build/bb.edn --deps-root . release-artifact "/tmp/release/$archive" +fi ## cleanup diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 0a5d297f..b2be6534 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -84,6 +84,11 @@ jobs: bb --config .build/bb.edn --deps-root . release-artifact %zip% + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + path: bb.exe + name: babashka-${{ steps.babashka-version.outputs.version }}-${{ matrix.name }}-amd64 - name: Test binary and libs shell: cmd @@ -92,9 +97,3 @@ jobs: set BABASHKA_TEST_ENV=native call script/test.bat :windows call script/run_lib_tests.bat - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - path: bb.exe - name: babashka-${{ steps.babashka-version.outputs.version }}-${{ matrix.name }}-amd64 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b1c42e5..6e9384e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,14 +172,6 @@ jobs: BABASHKA_MUSL: "true" run: script/compile - - name: Test binary and libs - run: | - script/test - script/run_lib_tests - - - name: Release - run: .circleci/script/release - - name: Upload artifact uses: actions/upload-artifact@v4 with: @@ -193,6 +185,14 @@ jobs: path: bb name: babashka-${{ steps.babashka-version.outputs.version }}-${{ matrix.name }}-static-amd64 + - name: Test binary and libs + run: | + script/test + script/run_lib_tests + + - name: Release + run: .circleci/script/release + docker: if: ${{ false }} # Disabled # if: "!contains(github.event.head_commit.message, 'skip ci') && github.event_name == 'push' && github.ref == 'refs/heads/master'" diff --git a/test-resources/lib_tests/bb-tested-libs.edn b/test-resources/lib_tests/bb-tested-libs.edn index 5cc7ab29..8a254a2b 100644 --- a/test-resources/lib_tests/bb-tested-libs.edn +++ b/test-resources/lib_tests/bb-tested-libs.edn @@ -205,7 +205,7 @@ com.potetm/fusebox {:git-url "https://github.com/potetm/fusebox" :git-sha "2f42391868c82c193628bec8922f8735ae3cac66" :test-paths ["test"] - :test-namespaces [#_com.potetm.fusebox.bulkhead-test + :test-namespaces [com.potetm.fusebox.bulkhead-test com.potetm.fusebox.bulwark-test com.potetm.fusebox.circuit-breaker-test com.potetm.fusebox.fallback-test