Update action.yml #86
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: build | |
on: push | |
env: | |
cache-suffix: v1 | |
build_flags: "-DWITH_COMMON=OFF -DWITH_BUILD_REQUIRED=ON -DWITH_BUILD_LAPACK=ON -DWITH_LAPACK=ON -DWITH_HSL=ON -DWITH_METIS=ON -DWITH_BUILD_METIS=ON -DWITH_BUILD_HSL=ON -DBUILD_HSL_SRC=/work/coinhsl/coinhsl-2022.11.09 -DWITH_BQPD=ON -DWITH_BUILD_BQPD=ON -DBUILD_BQPD_SRC=/work/bqpd" | |
build_flags_32bit: "" | |
build_flags_manylinux1: "" | |
build_flags_windows: "" | |
build_flags_mac: "-DWITH_BUILD_LAPACK=OFF" | |
build_flags_mac_intel: "" | |
build_flags_mac_m1: "" | |
jobs: | |
main-dockcross: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [manylinux1-x64,manylinux1-x86,manylinux2014-x64,manylinux2014-x86,windows-shared-x64-posix] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
repository: casadi/casadi | |
ref: uno | |
fetch-depth: 0 # for git-restore-mtime | |
- run: ls && pwd | |
- uses: chetan/[email protected] | |
- uses: dsaltares/[email protected] | |
with: | |
repo: jgillis/restricted | |
file: coinhsl-2022.11.09.zip | |
token: ${{ secrets.JGILLIS_RESTRICTED }} | |
- run: unzip coinhsl-2022.11.09.zip -d coinhsl | |
shell: bash | |
- uses: dsaltares/[email protected] | |
with: | |
repo: jgillis/restricted | |
file: bqpd.zip | |
token: ${{ secrets.JGILLIS_RESTRICTED }} | |
- run: unzip bqpd.zip | |
shell: bash | |
- run: ls bqpd | |
- run: cat coinhsl/coinhsl-2022.11.09/Makefile.in | |
- run: ls && pwd | |
- name: Setup dockcross | |
run: | | |
docker pull ghcr.io/jgillis/${{ matrix.target }}:production | |
docker image inspect ghcr.io/jgillis/${{ matrix.target }}:production | |
docker run --rm --env DEFAULT_DOCKCROSS_IMAGE=ghcr.io/jgillis/${{ matrix.target }}:production ghcr.io/jgillis/${{ matrix.target }}:production > dockcross | |
chmod +x dockcross | |
pwd | |
ls -al dockcross | |
- name: Cache build dir | |
uses: actions/[email protected] | |
with: | |
key: core-build-${{ matrix.target }}-${{env.cache-suffix}} | |
path: build | |
- name: Build | |
run: | | |
rm -f build/CMakeCache.txt | |
./dockcross cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/work/install -DWITH_SELFCONTAINED=ON ${{env.build_flags}} ${{ contains(matrix.target,'86') && env.build_flags_32bit || ''}} ${{ contains(matrix.target,'manylinux1') && env.build_flags_manylinux1 || ''}} ${{ contains(matrix.target,'windows') && env.build_flags_windows || ''}} -DCMAKE_PREFIX_PATH=/work/mockups/cmake -H. | |
# In MXE land, (cross).pkg-config does not listen to PKG_CONFIG_PATH straight see https://mxe.cc/#tutorial-4 | |
# Needed to make CoinUtils work | |
./dockcross --args "--env PKG_CONFIG_PATH_x86_64_w64_mingw32_shared_posix=/work/build/external_projects/lib64/pkgconfig:/work/build/external_projects/lib/pkgconfig:/work/build/external_projects/share/pkgconfig" -- /work/.github/workflows/patch_toolchain cmake --build build -v | |
./dockcross cmake --build build --target install -v | |
- uses: jgillis/universal_grafter@master | |
if: "!contains(matrix.target, 'windows')" | |
with: | |
source_path: install/casadi | |
destination_path: install/casadi | |
dockcross: ${{ matrix.target }} | |
bitness: 64 | |
skip_libs: 'filternothing' | |
- name: build archives | |
run: | | |
zip -j -q hsl-${{matrix.target}}.zip install/casadi/lib*hsl* | |
- name: Upload files to a GitHub release | |
uses: svenstaro/[email protected] | |
with: | |
overwrite: true | |
tag: perpetual | |
file: hsl-${{matrix.target}}.zip | |
prerelease: true | |
repo_token: ${{ secrets.JGILLIS_RESTRICTED }} | |
repo_name: jgillis/restricted | |
- name: build archives | |
run: | | |
zip -j -q bqpd-${{matrix.target}}.zip install/casadi/lib*bqpd* | |
- name: Upload files to a GitHub release | |
uses: svenstaro/[email protected] | |
with: | |
overwrite: true | |
tag: perpetual | |
file: bqpd-${{matrix.target}}.zip | |
prerelease: true | |
repo_token: ${{ secrets.JGILLIS_RESTRICTED }} | |
repo_name: jgillis/restricted | |
matrix-arch-mac: | |
runs-on: ubuntu-20.04 | |
steps: | |
- id: build-matrix | |
uses: jgillis/[email protected] | |
with: | |
config: | | |
matrix: | |
image: [macos-11] | |
operations: | |
- type: append | |
if: ${{ vars.BLESSED_REPO == 'yes' }} | |
matrix: | |
image: [macos-m1] | |
- run: echo ${{ steps.build-matrix.outputs.matrix }} | |
outputs: | |
matrix: ${{ steps.build-matrix.outputs.matrix }} | |
core-osx: | |
needs: [matrix-arch-mac] | |
runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }} | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.matrix-arch-mac.outputs.matrix) }} | |
steps: | |
- run: echo "${{ vars.BLESSED_REPO }} ${{ vars.BLESSED_REPO }}" | |
- uses: casadi/action-setup-compiler@master | |
with: | |
cache-suffix: '' | |
target: ${{matrix.image == 'macos-m1' && 'arm64' || 'x86_64'}} | |
- run: brew install pkg-config | |
- uses: actions/[email protected] | |
with: | |
repository: casadi/casadi | |
ref: uno | |
fetch-depth: 0 # for git-restore-mtime | |
- uses: chetan/[email protected] | |
- uses: dsaltares/[email protected] | |
with: | |
repo: jgillis/restricted | |
file: coinhsl-2022.11.09.zip | |
token: ${{ secrets.JGILLIS_RESTRICTED }} | |
- run: unzip coinhsl-2022.11.09.zip -d coinhsl | |
shell: bash | |
- uses: dsaltares/[email protected] | |
with: | |
repo: jgillis/restricted | |
file: bqpd.zip | |
token: ${{ secrets.JGILLIS_RESTRICTED }} | |
- run: unzip bqpd.zip | |
shell: bash | |
- run: ls && pwd | |
- name: Cache build dir | |
uses: actions/[email protected] | |
with: | |
key: core-build-${{matrix.image}}-${{env.cache-suffix}} | |
path: build | |
- name: Build | |
run: | | |
rm -f build/CMakeCache.txt | |
CC=${{ env.CC }} FC=${{ env.FC }} CXX=${{ env.CXX }} cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install -DCMAKE_OSX_SYSROOT=${{env.CONDA_BUILD_SYSROOT}} -Bbuild -DWITH_SELFCONTAINED=ON ${{env.build_flags}} ${{env.build_flags_mac}} ${{ contains(matrix.image,'m1') && env.build_flags_mac_m1 || ''}} ${{ contains(matrix.image,'macos-11') && env.build_flags_mac_intel || ''}} -DCMAKE_PREFIX_PATH=${{ github.workspace }}/mockups/cmake -DBUILD_HSL_SRC=${{ github.workspace }}/coinhsl/coinhsl-2022.11.09 -DBUILD_BQPD_SRC=${{ github.workspace }}/bqpd -H. | |
CC=${{ env.CC }} FC=${{ env.FC }} CXX=${{ env.CXX }} cmake --build build -v | |
cmake --build build --target install -v | |
- uses: jgillis/universal_grafter@master | |
with: | |
source_path: install/casadi | |
destination_path: install/casadi | |
search_paths: ${{env.COMPILER_LIB_SEARCH_PATH}} | |
skip_libs: 'filternothing' | |
- name: build archives | |
run: | | |
zip -j -q hsl-${{matrix.image}}.zip install/casadi/lib*hsl* | |
- name: Upload files to a GitHub release | |
uses: svenstaro/[email protected] | |
with: | |
overwrite: true | |
tag: perpetual | |
file: hsl-${{matrix.image}}.zip | |
repo_token: ${{ secrets.JGILLIS_RESTRICTED }} | |
prerelease: true | |
repo_name: jgillis/restricted | |
- name: build archives | |
run: | | |
zip -j -q bqpd-${{matrix.image}}.zip install/casadi/lib*bqpd* | |
- name: Upload files to a GitHub release | |
uses: svenstaro/[email protected] | |
with: | |
overwrite: true | |
tag: perpetual | |
file: bqpd-${{matrix.image}}.zip | |
repo_token: ${{ secrets.JGILLIS_RESTRICTED }} | |
prerelease: true | |
repo_name: jgillis/restricted |