Skip to content

fix

fix #111

Workflow file for this run

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-20.04
env:
arch: manylinux1-x64
strategy:
fail-fast: false
matrix:
arch: [manylinux1-x64,manylinux1-x86,manylinux2014-x64,manylinux2014-x86,manylinux2014-aarch64,windows-shared-x64-posix,linux-armv7-lts]
BUILD_TYPE: [Release,Debug]
steps:
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0 # for git-restore-mtime
- name: Setup dockcross
run: |
docker pull dockcross/${{ matrix.arch }}:latest
docker run --rm dockcross/${{ matrix.arch }}:latest > 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/action-zip@v1.1
with:
files: install/
recursive: true
dest: mockups_${{matrix.arch}}_${{matrix.BUILD_TYPE}}.zip
- run: ls ${{github.workspace}}
- uses: actions/upload-artifact@v3.1.2
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
with:
name: artifacts
path: ${{github.workspace}}/mockups_${{matrix.arch}}_${{matrix.BUILD_TYPE}}.zip
- name: Release
uses: softprops/action-gh-release@v0.1.15
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 }}
env:
arch: manylinux1-x64
strategy:
fail-fast: false
matrix:
image: [macos-11,macos-m1]
BUILD_TYPE: [Release,Debug]
steps:
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0 # for git-restore-mtime
- uses: casadi/action-setup-compiler@master
with:
cache-suffix: ''
target: ${{matrix.image == 'macos-m1' && 'arm64' || 'x86_64'}}
- 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}} -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/action-zip@v1.1
with:
files: install/
recursive: true
dest: mockups_${{matrix.image}}_${{matrix.BUILD_TYPE}}.zip
- run: ls ${{github.workspace}}
- uses: actions/upload-artifact@v3.1.2
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
with:
name: artifacts
path: ${{github.workspace}}/mockups_${{matrix.image}}_${{matrix.BUILD_TYPE}}.zip
- name: Release
uses: softprops/action-gh-release@v0.1.15
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/mockups_${{matrix.image}}_${{matrix.BUILD_TYPE}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}