Skip to content

Commit

Permalink
Update cmake_ninja_crossbuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
userdocs committed Nov 16, 2021
1 parent b7a89ad commit 0813b18
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/cmake_ninja_crossbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
prerelease: false

steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0

- name: Host - update
run: sudo apt-get update
Expand Down Expand Up @@ -133,11 +133,8 @@ jobs:
- name: Docker target - Git clone cmake
run: docker exec --env-file env.custom multiarch git clone https://github.com/Kitware/CMake.git /root/cmake

- name: Docker target - Bootstrap cmake
run: docker exec --env-file env.custom -w /root/cmake multiarch ./bootstrap --prefix=/root/build/${{ env.opt_dir_name}}

- name: Docker target - Configure cmake
run: docker exec --env-file env.custom -w /root/cmake multiarch ./configure --prefix=/root/build/${{ env.opt_dir_name}}
run: docker exec --env-file env.custom -w /root/cmake multiarch ./configure --enable-ccache --prefix=/root/build/${{ env.opt_dir_name}}

- name: Docker target - Make build cmake
run: docker exec --env-file env.custom -w /root/cmake multiarch make -j$(nproc)
Expand All @@ -148,13 +145,17 @@ jobs:
- name: Docker target - Git clone ninja
run: docker exec --env-file env.custom multiarch git clone --shallow-submodules --recurse-submodules https://github.com/ninja-build/ninja.git /root/ninja

- name: Docker target - build ninja
- name: Docker target - Configure ninja
run: |
docker exec --env-file env.custom -w /root/ninja multiarch /root/build/${{ env.opt_dir_name}}/bin/cmake -B build
docker exec --env-file env.custom -w /root/ninja multiarch /root/build/${{ env.opt_dir_name}}/bin/cmake --build build
docker exec --env-file env.custom -w /root/ninja multiarch /root/build/${{ env.opt_dir_name}}/bin/cmake -B build \
-D CMAKE_BUILD_TYPE="release" \
-D CMAKE_INSTALL_PREFIX="/root/build/${{ env.opt_dir_name}}"
- name: Docker target - Build ninja
run: docker exec --env-file env.custom -w /root/ninja multiarch /root/build/${{ env.opt_dir_name}}/bin/cmake --build build -j"$(nproc)"

- name: Docker target - copy ninja
run: docker exec --env-file env.custom -w /root/ninja/build multiarch cp -f "ninja" "/root/build/${{ env.opt_dir_name}}/bin/ninja"
- name: Docker target - Install ninja
run: docker exec --env-file env.custom -w /root/ninja multiarch /root/build/${{ env.opt_dir_name}}/bin/cmake --install build

- name: Docker target - Get cmake version version - ${{ matrix.arch }}
run: |
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
run: mv -f "${{ matrix.name }}_${{ env.cmake_version }}+${{ env.ninja_version }}_${{ matrix.arch }}.deb" "${{ matrix.os_id }}-${{ matrix.os_version_id }}-${{ matrix.name }}-${{ matrix.arch }}.deb"

- name: Host - "Create release - tag - assets"
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@v1.8.10
with:
prerelease: ${{ env.prerelease }}
artifacts: "${{ matrix.os_id }}-${{ matrix.os_version_id }}-${{ matrix.name }}-${{ matrix.arch }}.deb"
Expand Down

0 comments on commit 0813b18

Please sign in to comment.