diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index aedb83bc7..8c34eb07b 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -11,7 +11,7 @@ jobs: build-and-test-for-release: runs-on: ubuntu-latest permissions: - contents: read + contents: write packages: write strategy: @@ -57,6 +57,7 @@ jobs: with: cache-from: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache file: docker/Dockerfile + target: cycamore push: true tags: | ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:${{ env.version_tag }} @@ -65,3 +66,24 @@ jobs: pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} cyclus_tag=stable + + - name: Make Debian Package + if: matrix.pkg_mgr == 'apt' && matrix.ubuntu_versions == '22.04' + uses: docker/build-push-action@v5 + with: + cache-from: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache + file: docker/Dockerfile + target: deb-package + outputs: type=local,dest=. + build-args: | + pkg_mgr=${{ matrix.pkg_mgr }} + ubuntu_version=${{ matrix.ubuntu_versions }} + cyclus_tag=stable + + - name: Upload .deb to release + if: github.event_name == 'release' && matrix.pkg_mgr == 'apt' && matrix.ubuntu_versions == '22.04' + uses: alexellis/upload-assets@0.4.0 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + asset_paths: '["cycamore*.deb"]' \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index b67d493ae..5a9e2eb78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,7 +349,7 @@ IF(NOT CYCLUS_DOC_ONLY) SET(CPACK_PACKAGE_VERSION_PATCH "${CMAKE_PROJECT_VERSION_PATCH}") # Dependencies - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "cyclus (>= 1.4.0)") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "cyclus (>= 1.5.5)") MESSAGE("CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}") # Names @@ -358,13 +358,6 @@ IF(NOT CYCLUS_DOC_ONLY) SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_INSTALL_DIRECTORY}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_INSTALL_DIRECTORY}.${CPACK_PACKAGE_VERSION_PATCH}") - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_PACKAGE_VERSION_MAJOR}") - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${CPACK_PACKAGE_VERSION_MINOR}") - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${CPACK_PACKAGE_VERSION_PATCH}") - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_HASH_NAME}") - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_SYSTEM_NAME}") - # Configuration SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "1") SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) diff --git a/docker/Dockerfile b/docker/Dockerfile index 68f3badf2..a8f331177 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,6 +10,13 @@ WORKDIR /cycamore RUN python install.py -j ${make_cores} --build-type=Release +FROM cycamore as deb-generation +WORKDIR /cyclus/build +RUN make package + +FROM scratch as deb-package +COPY --from=deb-generation /cycamore/build/cycamore*.deb / + FROM cycamore as cycamore-test RUN cycamore_unit_tests