Expand xpress mockup #209
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
| name: CMake | |
| on: push | |
| env: | |
| # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| BUILD_TYPE: Release | |
| TAG: win64_vs2017 | |
| jobs: | |
| build-dockcross: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| arch: manylinux1-x64 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [manylinux1-x64,manylinux1-x86,manylinux2014-x64,manylinux2014-x86,manylinux2014-aarch64,manylinux2014-x64-modern,manylinux2014-x86-modern,manylinux2014-aarch64-modern,windows-shared-x64-posix,linux-armv7-lts,manylinux_2_28-x64,manylinux_2_28-aarch64,windows-arm64] | |
| BUILD_TYPE: [Release,Debug] | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 # for git-restore-mtime | |
| - name: Setup dockcross | |
| run: | | |
| docker pull ghcr.io/jgillis/${{ matrix.arch }}:production | |
| docker run --rm --env DEFAULT_DOCKCROSS_IMAGE=ghcr.io/jgillis/${{ matrix.arch }}:production ghcr.io/jgillis/${{ matrix.arch }}:production > dockcross | |
| chmod +x dockcross | |
| - name: Build | |
| # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
| # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
| run: | | |
| ./dockcross cmake -B /work/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DCMAKE_INSTALL_PREFIX=/work/install | |
| ./dockcross cmake --build /work/build --target install --config ${{matrix.BUILD_TYPE}} | |
| - run: ls ${{github.workspace}}/install | |
| - name: Easy Zip Files | |
| uses: vimtor/[email protected] | |
| with: | |
| files: install/ | |
| recursive: true | |
| dest: mockups_${{matrix.arch}}_${{matrix.BUILD_TYPE}}.zip | |
| - run: ls ${{github.workspace}} | |
| - uses: actions/[email protected] | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: mockups_${{matrix.arch}}_${{matrix.BUILD_TYPE}} | |
| path: ${{github.workspace}}/mockups_${{matrix.arch}}_${{matrix.BUILD_TYPE}}.zip | |
| - name: Release | |
| uses: softprops/[email protected] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: ${{github.workspace}}/mockups_${{matrix.arch}}_${{matrix.BUILD_TYPE}}.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-osx: | |
| runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image: [macos-14] | |
| target: [arm64, x86_64] | |
| BUILD_TYPE: [Release,Debug] | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 # for git-restore-mtime | |
| - uses: casadi/action-setup-compiler@master | |
| with: | |
| cache-suffix: '' | |
| target: ${{ matrix.target }} | |
| - name: Build | |
| # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
| # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
| run: | | |
| CC=${{ env.CC }} FC=${{ env.FC }} CXX=${{ env.CXX }} cmake -DCMAKE_OSX_SYSROOT=${{env.CONDA_BUILD_SYSROOT}} -DCMAKE_OSX_ARCHITECTURES=${{matrix.target}} -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install | |
| cmake --build build --target install --config ${{matrix.BUILD_TYPE}} | |
| - run: ls ${{github.workspace}}/install | |
| - name: Easy Zip Files | |
| uses: vimtor/[email protected] | |
| with: | |
| files: install/ | |
| recursive: true | |
| dest: mockups_${{matrix.image}}_${{matrix.target}}_${{matrix.BUILD_TYPE}}.zip | |
| - run: ls ${{github.workspace}} | |
| - uses: actions/[email protected] | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: mockups_${{matrix.image}}_${{matrix.target}}_${{matrix.BUILD_TYPE}} | |
| path: ${{github.workspace}}/mockups_${{matrix.image}}_${{matrix.target}}_${{matrix.BUILD_TYPE}}.zip | |
| - name: Release | |
| uses: softprops/[email protected] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: ${{github.workspace}}/mockups_${{matrix.image}}_${{matrix.target}}_${{matrix.BUILD_TYPE}}.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |