Preparing release #133
Workflow file for this run
This file contains hidden or 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
| # Github Actions configuration file | |
| name: Build | |
| on: | |
| push: | |
| tags: | |
| - '*.*.*' | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - os: windows-latest | |
| arch: x64 | |
| configure_args: "-A x64 -DCPACK_SYSTEM_NAME=Windows-x86_64" | |
| packages: "ZIP WIX" | |
| - os: windows-latest | |
| arch: arm64 | |
| configure_args: "-A ARM64 -DCPACK_SYSTEM_NAME=Windows-arm64" | |
| packages: "ZIP WIX" | |
| - os: ubuntu-22.04 | |
| arch: amd64 | |
| configure_args: "-DCPACK_SYSTEM_NAME=Linux-x86_64" | |
| packages: "TGZ DEB RPM" | |
| - os: ubuntu-22.04-arm | |
| arch: arm64 | |
| configure_args: "-DCPACK_SYSTEM_NAME=Linux-arm64" | |
| packages: "TGZ DEB RPM" | |
| - os: macos-14 | |
| arch: x86_64 | |
| configure_args: "-DCMAKE_OSX_ARCHITECTURES=x86_64 -DCPACK_SYSTEM_NAME=Darwin-x86_64" | |
| packages: "ZIP" | |
| - os: macos-14 | |
| arch: arm64 | |
| configure_args: "-DCMAKE_OSX_ARCHITECTURES=arm64 -DCPACK_SYSTEM_NAME=Darwin-arm64" | |
| packages: "ZIP" | |
| - os: macos-14 | |
| arch: universal | |
| configure_args: "-DCMAKE_C_FLAGS='-mmacosx-version-min=11.0 -arch x86_64 -arch arm64' -DCMAKE_CXX_FLAGS='-mmacosx-version-min=11.0 -arch x86_64 -arch arm64' -DCPACK_SYSTEM_NAME=Darwin-universal" | |
| packages: "ZIP" | |
| steps: | |
| - name: Setup Windows/MSVC | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: amd64_x86 | |
| - name: Setup Linux | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libudev-dev libusb-1.0-0-dev libx11-dev libx11-xcb-dev libdbus-1-dev libwayland-dev libxkbcommon-dev libxkbcommon-x11-dev libgtk-3-dev libayatana-appindicator3-dev rpm | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Configure CMake | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_INSTALL_PREFIX=dist ${{matrix.config.configure_args}} | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config Release | |
| - name: Install | |
| run: cmake --install ${{github.workspace}}/build --config Release | |
| - name: Package | |
| shell: "bash" | |
| run: | | |
| export workDir=$(echo /"${{github.workspace}}" | sed -e 's/\\/\//g' -e 's/://' -e 's|//|/|') # Fix windows paths | |
| for package in ${{matrix.config.packages}}; do | |
| cpack -G ${package} --config ${workDir}/build/CPackConfig.cmake | |
| done | |
| - name: Upload to Github release | |
| uses: xresloader/upload-to-github-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| file: "*.zip;*.tar.gz;*.msi;*.deb;*.rpm" | |
| tags: true | |
| draft: false |