fix: update xcode #143
Workflow file for this run
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: create-release-upload | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
create_releases: | |
name: create-releases | |
runs-on: ubuntu-22.04 | |
outputs: | |
release_url: ${{ steps.output_url.outputs.upload_url }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release ${{ steps.get_version.outputs.VERSION }} | |
body: | | |
Changes in this Release | |
- First Change | |
- Second Change | |
prerelease: true | |
continue-on-error: true | |
upload-object-windows: | |
name: upload-object-win | |
needs: create_releases | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
bin: [vs2022, vs2022-static, vs2019, vs2019-static, gcc, gcc-static] | |
include: | |
- bin: vs2022 | |
shared: on | |
generator: Visual Studio 17 2022 | |
os: windows-2022 | |
- bin: vs2022-static | |
shared: off | |
generator: Visual Studio 17 2022 | |
os: windows-2022 | |
- bin: vs2019 | |
shared: on | |
generator: Visual Studio 16 2019 | |
os: windows-2019 | |
- bin: vs2019-static | |
shared: off | |
generator: Visual Studio 16 2019 | |
os: windows-2019 | |
- bin: gcc | |
shared: on | |
generator: MSYS Makefiles | |
os: windows-2019 | |
- bin: gcc-static | |
shared: off | |
generator: MSYS Makefiles | |
os: windows-2019 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: output url | |
id: get_url | |
run: echo "upload_url=${{ needs.create_releases.outputs.release_url }}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: dump version | |
env: | |
version: ${{ steps.get_version.outputs.VERSION }} | |
run: echo "version=${version}" | |
shell: bash | |
- name: Get the asset name | |
id: asset_name | |
run: echo "ASSET_NAME=cfd-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.bin }}-x86_64.zip" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: create folder | |
run: mkdir dist | |
- name: cmake-build | |
run: | | |
cmake -S . -B build -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_CAPI=on -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DCMAKE_INSTALL_PREFIX="./dist" | |
cmake --build build --parallel 2 --config Release | |
timeout-minutes: 20 | |
- name: cmake-install | |
run: | | |
cmake --install build | |
cd dist | |
del /F /Q cmake\wallycore-* | |
del /F /Q lib\wallycore.* | |
del /F /Q lib\libwallycore.* | |
del /F /Q lib\pkgconfig\wallycore.pc | |
shell: cmd | |
- name: create archive file | |
run: | | |
cd dist | |
Compress-Archive -Path ./* -DestinationPath ../${{ steps.asset_name.outputs.ASSET_NAME }} | |
cd .. | |
echo "---- dump zip file ----" | |
dir . | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ steps.asset_name.outputs.ASSET_NAME }} | |
upload-object-ubuntu: | |
name: upload-object-ubuntu | |
needs: create_releases | |
runs-on: ubuntu-${{ matrix.os_ver }}.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
os_ver: [22, 20] | |
bin: [gcc, gcc-static] | |
include: | |
- bin: gcc | |
shared: on | |
- bin: gcc-static | |
shared: off | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Get the asset name | |
id: asset_name | |
run: echo "ASSET_NAME=cfd-${{ steps.get_version.outputs.VERSION }}-ubuntu${{ matrix.os_ver }}04-${{ matrix.bin }}-x86_64.zip" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: cmake-build | |
run: | | |
mkdir dist | |
mkdir build | |
cd build | |
cmake .. -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DCMAKE_BUILD_TYPE=Release -DTARGET_RPATH="/usr/local/lib" | |
cd .. | |
cmake --build build --parallel 2 --config Release | |
cd build | |
sudo make install DESTDIR=../dist | |
cd .. | |
timeout-minutes: 20 | |
- name: create archive file | |
run: | | |
cd dist | |
zip -r ../${{ steps.asset_name.outputs.ASSET_NAME }} usr | |
echo "---- dump zip file ----" | |
ls -l | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ steps.asset_name.outputs.ASSET_NAME }} | |
upload-object-alpine: | |
name: upload-object-alpine | |
needs: create_releases | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
alpine: ['3.15', '3.16', '3.17', '3.18'] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Get the asset name | |
id: asset_name | |
run: echo "ASSET_NAME=cfd-${{ steps.get_version.outputs.VERSION }}-alpine-${{ matrix.alpine }}-x86_64.zip" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: list | |
run: ls -a $GITHUB_WORKSPACE | |
- name: docker setup 3.15 | |
if: matrix.alpine == '3.15' | |
uses: docker://alpine:3.15 | |
with: | |
entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh | |
- name: docker setup 3.16 | |
if: matrix.alpine == '3.16' | |
uses: docker://alpine:3.16 | |
with: | |
entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh | |
- name: docker setup 3.17 | |
if: matrix.alpine == '3.17' | |
uses: docker://alpine:3.17 | |
with: | |
entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh | |
- name: docker setup 3.18 | |
if: matrix.alpine == '3.18' | |
uses: docker://alpine:3.18 | |
with: | |
entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh | |
- name: create archive file | |
run: | | |
echo "---- dump output data ----" | |
ls -l $GITHUB_WORKSPACE/dist/usr/local/* | |
mkdir -p /tmp/cfd | |
sudo chmod 777 /tmp/cfd | |
sudo chown runner /tmp/cfd | |
sudo cp -r $GITHUB_WORKSPACE/dist/usr /tmp/cfd | |
cd /tmp/cfd | |
sudo zip -r /tmp/cfd/cfd.zip usr | |
sudo chmod 777 /tmp/cfd/cfd.zip | |
sudo chown runner /tmp/cfd/cfd.zip | |
sudo cp -rp /tmp/cfd/cfd.zip $GITHUB_WORKSPACE/dist/cfd.zip | |
echo "---- dump zip file ----" | |
sudo ls -l /tmp/cfd | |
- name: rename asset | |
run: mv /tmp/cfd/cfd.zip ${{ steps.asset_name.outputs.ASSET_NAME }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ steps.asset_name.outputs.ASSET_NAME }} | |
upload-object-macos: | |
name: upload-object-macos | |
needs: create_releases | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
xcode: ['12.5.1', '13.2.1', '13.4.1', '14.2', '14.3.1'] | |
shared: [on, off] | |
include: | |
- xcode: '12.5.1' | |
os: macos-11 | |
- xcode: '13.2.1' | |
os: macos-11 | |
- xcode: '13.4.1' | |
os: macos-12 | |
- xcode: '14.2' | |
os: macos-12 | |
- xcode: '14.3.1' | |
os: macos-13 | |
- shared: on | |
suffix: '' | |
- shared: off | |
suffix: '-static' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Get the asset name | |
id: asset_name | |
run: echo "ASSET_NAME=cfd-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode }}${{ matrix.suffix }}-x86_64.zip" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Select Xcode version | |
run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer' | |
- name: Show Xcode version | |
run: xcodebuild -version | |
- name: cmake-build | |
run: | | |
mkdir dist | |
mkdir build | |
cd build | |
cmake .. -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DCMAKE_BUILD_TYPE=Release -DTARGET_RPATH="/usr/local/lib;@executable_path;./build/Release" | |
cd .. | |
cmake --build build --parallel 2 --config Release | |
cd build | |
sudo make install DESTDIR=../dist | |
cd .. | |
timeout-minutes: 40 | |
- name: create archive file | |
run: | | |
cd dist | |
zip -r ../${{ steps.asset_name.outputs.ASSET_NAME }} usr | |
echo "---- dump zip file ----" | |
ls -l | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ steps.asset_name.outputs.ASSET_NAME }} |