diff --git a/.github/workflows/make-tests.yml b/.github/workflows/make-tests.yml index 7392253ae..bc0511f64 100644 --- a/.github/workflows/make-tests.yml +++ b/.github/workflows/make-tests.yml @@ -1,10 +1,10 @@ name: Regression tests on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +# push: +# branches: [ master ] +# pull_request: +# branches: [ master ] jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 587553389..f72cb2733 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,12 @@ name: Build/publish release binaries (Linux, Mac) +# Also build/publish a prism-X.Y-src.tar.gz + on: + push: + branches: [ master ] + pull_request: + branches: [ master ] # push: # # Trigger on version tags: v4.10 etc. # tags: @@ -20,14 +26,37 @@ on: jobs: + build_src: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Use the tag from manual input, otherwise fall back to the git ref + ref: ${{ github.event.inputs.tag_name || github.ref }} + fetch-depth: 0 # Fetches all tags and history + - name: Build source + shell: bash + working-directory: ./prism + run: | + make release_source BRANCH=HEAD + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: prism-src + path: prism/release/*.tar.gz + build: strategy: matrix: include: - os: ubuntu-latest - artifact_name: prism-linux64 + artifact_name: prism-linux64-x86 + - os: ubuntu-22.04-arm + artifact_name: prism-linux64-arm - os: macos-latest - artifact_name: prism-macos64 + artifact_name: prism-mac64-arm + - os: macos-15-intel + artifact_name: prism-mac64-x86 runs-on: ${{ matrix.os }} steps: @@ -58,16 +87,20 @@ jobs: matrix: include: - os: ubuntu-latest - artifact: prism-linux64 + artifact_name: prism-linux64-x86 + - os: ubuntu-22.04-arm + artifact_name: prism-linux64-arm - os: macos-latest - artifact: prism-macos64 + artifact_name: prism-mac64-arm + - os: macos-15-intel + artifact_name: prism-mac64-x86 runs-on: ${{ matrix.os }} steps: - name: Download Artifact uses: actions/download-artifact@v4 with: - name: ${{ matrix.artifact }} + name: ${{ matrix.artifact_name }} path: test-dir - name: Verify download run: ls -R test-dir/ @@ -82,7 +115,7 @@ jobs: etc/tests/run.sh publish: - needs: [build, test_release] + needs: [build_src, build, test_release] runs-on: ubuntu-latest permissions: # Crucial for creating releases diff --git a/prism/Makefile b/prism/Makefile index 780549e54..1be0caa6b 100644 --- a/prism/Makefile +++ b/prism/Makefile @@ -625,11 +625,12 @@ build_release: release_source: release_check_version build_release_source build_release_source: - @echo Creating source distribution from branch "$(BRANCH)" in "release/$(SRC_DIST_FILE)"... && \ + echo Creating source distribution from branch "$(BRANCH)" in "release/$(SRC_DIST_FILE)"... && \ mkdir -p release && \ rm -rf "release/$(SRC_DIST_DIR)" && \ rm -f "release/$(SRC_DIST_FILE)" && \ mkdir -p "release/$(SRC_DIST_DIR)" && \ + git branch --v && \ (cd .. && git archive $(BRANCH) --format=tar) | tar xf - -C "release/$(SRC_DIST_DIR)" && \ (cd release && tar cfz "$(SRC_DIST_FILE)" "$(SRC_DIST_DIR)") && rm -rf "release/$(SRC_DIST_DIR)"