Merge branch 'main' into install-macos-update #781
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Package Installers | |
on: | |
push: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: | |
contents: read | |
jobs: | |
package-installers: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- name: macOS | |
generator: Xcode | |
os: macos-15 | |
package: TGZ | |
- name: Linux | |
apt_install: cmake | |
generator: Unix Makefiles | |
os: ubuntu-22.04 | |
package: TGZ | |
- name: Windows | |
generator: Visual Studio 17 2022 | |
os: windows-2022 | |
package: ZIP | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install Dependencies (Linux) | |
if: matrix.apt_install != '' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ${{ matrix.apt_install }} | |
- name: Create Build Environment | |
shell: bash | |
run: cmake -E make_directory ${{ github.workspace }}/build | |
- name: CMake Configure | |
shell: bash | |
run: | | |
cmake -S "${{ github.workspace }}" \ | |
-B "${{ github.workspace }}/build" \ | |
-G "${{ matrix.generator }}" \ | |
-D CMAKE_BUILD_TYPE=Release | |
- name: Package | |
id: create-package | |
shell: bash | |
run: | | |
cd "${{ github.workspace }}/build"; \ | |
cpack -G "${{ matrix.package }}" -C Release | \ | |
tee out.txt | |
value="$(sed -n 's/CPack: - package: \(.*\) generated.$/\1/p' out.txt)" | |
echo "INSTALL_FILE=$value" | tee -a "$GITHUB_OUTPUT" | |
echo "INSTALL_BASENAME=$(basename $value)" | tee -a "$GITHUB_OUTPUT" | |
echo "### Created installer: $value" >> "$GITHUB_STEP_SUMMARY" | |
- name: Upload | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: ${{ steps.create-package.outputs.INSTALL_BASENAME }} | |
path: ${{ steps.create-package.outputs.INSTALL_FILE }} |