From 05af7f97c855a241996d371b1a2d72f97e591db1 Mon Sep 17 00:00:00 2001 From: k-matsuzawa Date: Mon, 4 Sep 2023 13:15:05 +0900 Subject: [PATCH 1/2] style: yamlfmt --- .github/workflows/check_pre-merge.yml | 18 +- .../workflows/create_release-and-upload.yml | 412 +++++++++--------- .yamlfmt | 17 + 3 files changed, 232 insertions(+), 215 deletions(-) create mode 100644 .yamlfmt diff --git a/.github/workflows/check_pre-merge.yml b/.github/workflows/check_pre-merge.yml index f0c36d5..2b8d96a 100644 --- a/.github/workflows/check_pre-merge.yml +++ b/.github/workflows/check_pre-merge.yml @@ -1,18 +1,18 @@ name: pre-merge check -on: +on: push: branches: - - master - - develop - - features/sprint* - - stable_v* + - master + - develop + - features/sprint* + - stable_v* pull_request: branches: - - master - - develop - - features/sprint* - - stable_v* + - master + - develop + - features/sprint* + - stable_v* jobs: rust-test: diff --git a/.github/workflows/create_release-and-upload.yml b/.github/workflows/create_release-and-upload.yml index 2f0db39..7dd7b3f 100644 --- a/.github/workflows/create_release-and-upload.yml +++ b/.github/workflows/create_release-and-upload.yml @@ -1,9 +1,9 @@ name: create-release-upload -on: +on: push: tags: - - 'v*' + - 'v*' jobs: create_releases: @@ -13,33 +13,33 @@ jobs: release_url: ${{ steps.output_url.outputs.upload_url }} steps: - - name: checkout - uses: actions/checkout@v3 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: | - Changes in this Release - - First Change - - Second Change - draft: false - prerelease: true - continue-on-error: true - - name: Get release - if: steps.create_release.outcome == 'failure' - id: get_release - uses: bruceadams/get-release@v1.2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: output url - id: output_url - run: | - echo "upload_url=${{steps.get_release.outputs.upload_url}}${{steps.create_release.outputs.upload_url}}" >> $GITHUB_OUTPUT + - name: checkout + uses: actions/checkout@v3 + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this Release + - First Change + - Second Change + draft: false + prerelease: true + continue-on-error: true + - name: Get release + if: steps.create_release.outcome == 'failure' + id: get_release + uses: bruceadams/get-release@v1.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: output url + id: output_url + run: | + echo "upload_url=${{steps.get_release.outputs.upload_url}}${{steps.create_release.outputs.upload_url}}" >> $GITHUB_OUTPUT upload-object-windows: name: upload-object-win @@ -61,61 +61,61 @@ jobs: suffix: '-static' 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: create folder - run: | - cd cfd-sys/cfd-cmake - mkdir dist - - name: cmake-build - run: | - cd cfd-sys/cfd-cmake - cmake -S . -B build -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 - cd ../.. - timeout-minutes: 20 - - name: cmake-install - run: | - cd cfd-sys/cfd-cmake - 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 cfd-sys/cfd-cmake - cd dist - Compress-Archive -Path ./* -DestinationPath ../cfd.zip - cd .. - echo "---- dump zip file ----" - dir . - - name: Upload Release Asset - id: upload-release-asset -# if: success() - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_url.outputs.upload_url }} - asset_path: ./cfd-sys/cfd-cmake/cfd.zip - asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.bin }}${{ matrix.suffix }}-x86_64.zip - asset_content_type: application/zip + - 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: create folder + run: | + cd cfd-sys/cfd-cmake + mkdir dist + - name: cmake-build + run: | + cd cfd-sys/cfd-cmake + cmake -S . -B build -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 + cd ../.. + timeout-minutes: 20 + - name: cmake-install + run: | + cd cfd-sys/cfd-cmake + 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 cfd-sys/cfd-cmake + cd dist + Compress-Archive -Path ./* -DestinationPath ../cfd.zip + cd .. + echo "---- dump zip file ----" + dir . + - name: Upload Release Asset + id: upload-release-asset + # if: success() + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_url.outputs.upload_url }} + asset_path: ./cfd-sys/cfd-cmake/cfd.zip + asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.bin }}${{ matrix.suffix }}-x86_64.zip + asset_content_type: application/zip upload-object-ubuntu: name: upload-object-ubuntu @@ -133,42 +133,42 @@ jobs: 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: cmake-build - run: | - cd cfd-sys/cfd-cmake - 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 ../../.. - - name: create archive file - run: | - cd cfd-sys/cfd-cmake - cd dist - zip -r cfd.zip usr - echo "---- dump zip file ----" - ls -l - - name: output url - id: get_url - run: echo "upload_url=${{ needs.create_releases.outputs.release_url }}" >> $GITHUB_OUTPUT - - name: Upload Release Asset Ubuntu - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_url.outputs.upload_url }} - asset_path: ./cfd-sys/cfd-cmake/dist/cfd.zip - asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-ubuntu${{ matrix.os_ver }}04-${{ matrix.bin }}-x86_64.zip - asset_content_type: application/zip + - name: checkout + uses: actions/checkout@v3 + - name: Get the version + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + - name: cmake-build + run: | + cd cfd-sys/cfd-cmake + 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 ../../.. + - name: create archive file + run: | + cd cfd-sys/cfd-cmake + cd dist + zip -r cfd.zip usr + echo "---- dump zip file ----" + ls -l + - name: output url + id: get_url + run: echo "upload_url=${{ needs.create_releases.outputs.release_url }}" >> $GITHUB_OUTPUT + - name: Upload Release Asset Ubuntu + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_url.outputs.upload_url }} + asset_path: ./cfd-sys/cfd-cmake/dist/cfd.zip + asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-ubuntu${{ matrix.os_ver }}04-${{ matrix.bin }}-x86_64.zip + asset_content_type: application/zip upload-object-alpine: name: upload-object-alpine @@ -180,62 +180,62 @@ jobs: alpine: ['3.14', '3.15', '3.16', '3.17'] steps: - - name: checkout - uses: actions/checkout@v3 - - name: Get the version - id: get_version - run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - - name: list - run: ls -a $GITHUB_WORKSPACE - - name: docker setup 3.14 - if: matrix.alpine == '3.14' - uses: docker://alpine:3.14 - with: - entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh - - 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: 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: output url - id: get_url - run: echo "upload_url=${{ needs.create_releases.outputs.release_url }}" >> $GITHUB_OUTPUT - - name: Upload Release Asset - id: upload-release-asset -# if: success() - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_url.outputs.upload_url }} - asset_path: /tmp/cfd/cfd.zip - asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-alpine${{ matrix.alpine }}_x86_64.zip - asset_content_type: application/zip + - name: checkout + uses: actions/checkout@v3 + - name: Get the version + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + - name: list + run: ls -a $GITHUB_WORKSPACE + - name: docker setup 3.14 + if: matrix.alpine == '3.14' + uses: docker://alpine:3.14 + with: + entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh + - 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: 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: output url + id: get_url + run: echo "upload_url=${{ needs.create_releases.outputs.release_url }}" >> $GITHUB_OUTPUT + - name: Upload Release Asset + id: upload-release-asset + # if: success() + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_url.outputs.upload_url }} + asset_path: /tmp/cfd/cfd.zip + asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-alpine${{ matrix.alpine }}_x86_64.zip + asset_content_type: application/zip upload-object-macos: name: upload-object-macos @@ -261,33 +261,33 @@ jobs: os: macos-11 steps: - - name: checkout - uses: actions/checkout@v3 - - name: Get the version - id: get_version - run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - - name: cmake-build - run: | - cd cfd-sys/cfd-cmake - 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 ../../.. - - name: create archive file - run: | - cd cfd-sys/cfd-cmake - cd dist - zip -r cfd.zip usr - echo "---- dump zip file ----" - ls -l - cd ../../.. - mv ./cfd-sys/cfd-cmake/dist/cfd.zip ./cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode_version }}${{ matrix.suffix }}-x86_64.zip - - name: Upload Release Asset Ubuntu - uses: softprops/action-gh-release@v1 - with: - files: cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode_version }}${{ matrix.suffix }}-x86_64.zip + - name: checkout + uses: actions/checkout@v3 + - name: Get the version + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + - name: cmake-build + run: | + cd cfd-sys/cfd-cmake + 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 ../../.. + - name: create archive file + run: | + cd cfd-sys/cfd-cmake + cd dist + zip -r cfd.zip usr + echo "---- dump zip file ----" + ls -l + cd ../../.. + mv ./cfd-sys/cfd-cmake/dist/cfd.zip ./cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode_version }}${{ matrix.suffix }}-x86_64.zip + - name: Upload Release Asset Ubuntu + uses: softprops/action-gh-release@v1 + with: + files: cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode_version }}${{ matrix.suffix }}-x86_64.zip diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 0000000..a4c1dfd --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,17 @@ +# https://github.com/google/yamlfmt/blob/v0.9.0/docs/config-file.md#configuration +line_ending: 'lf' +doublestar: true +include: + - '.github/**/*.{yaml,yml}' + - './docker-*.{yaml,yml}' + +formatter: + # 使用するフォーマッター + type: basic + # フォーマッターの設定 ( https://github.com/google/yamlfmt/blob/v0.9.0/docs/config-file.md#basic-formatter ) + indent: 2 + retain_line_breaks: true + max_line_length: 0 + scan_folded_as_literal: true + drop_merge_tag: true + pad_line_comments: 1 From db2f804b7c03de75a880a2a7b32840e8034a1126 Mon Sep 17 00:00:00 2001 From: k-matsuzawa Date: Mon, 4 Sep 2023 13:30:48 +0900 Subject: [PATCH 2/2] feat: update CI --- .github/workflows/check_pre-merge.yml | 2 +- .../workflows/create_release-and-upload.yml | 124 ++++++++---------- 2 files changed, 53 insertions(+), 73 deletions(-) diff --git a/.github/workflows/check_pre-merge.yml b/.github/workflows/check_pre-merge.yml index 2b8d96a..c3c0023 100644 --- a/.github/workflows/check_pre-merge.yml +++ b/.github/workflows/check_pre-merge.yml @@ -20,7 +20,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-2019, macos-11, ubuntu-20.04] + os: [windows-2019, macos-12, ubuntu-20.04] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/create_release-and-upload.yml b/.github/workflows/create_release-and-upload.yml index 7dd7b3f..2048446 100644 --- a/.github/workflows/create_release-and-upload.yml +++ b/.github/workflows/create_release-and-upload.yml @@ -9,37 +9,25 @@ jobs: create_releases: name: create-releases runs-on: ubuntu-20.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: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + name: Release ${{ steps.get_version.outputs.VERSION }} body: | Changes in this Release - First Change - Second Change - draft: false prerelease: true continue-on-error: true - - name: Get release - if: steps.create_release.outcome == 'failure' - id: get_release - uses: bruceadams/get-release@v1.2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: output url - id: output_url - run: | - echo "upload_url=${{steps.get_release.outputs.upload_url}}${{steps.create_release.outputs.upload_url}}" >> $GITHUB_OUTPUT upload-object-windows: name: upload-object-win @@ -63,10 +51,6 @@ jobs: 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 @@ -76,6 +60,10 @@ jobs: 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-sys-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.bin }}${{ matrix.suffix }}-x86_64.zip" >> $GITHUB_OUTPUT + shell: bash - name: create folder run: | cd cfd-sys/cfd-cmake @@ -101,21 +89,15 @@ jobs: run: | cd cfd-sys/cfd-cmake cd dist - Compress-Archive -Path ./* -DestinationPath ../cfd.zip + Compress-Archive -Path ./* -DestinationPath ../../../${{ steps.asset_name.outputs.ASSET_NAME }} cd .. echo "---- dump zip file ----" dir . - name: Upload Release Asset id: upload-release-asset - # if: success() - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: - upload_url: ${{ steps.get_url.outputs.upload_url }} - asset_path: ./cfd-sys/cfd-cmake/cfd.zip - asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.bin }}${{ matrix.suffix }}-x86_64.zip - asset_content_type: application/zip + files: ${{ steps.asset_name.outputs.ASSET_NAME }} upload-object-ubuntu: name: upload-object-ubuntu @@ -138,6 +120,10 @@ jobs: - 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-sys-${{ steps.get_version.outputs.VERSION }}-ubuntu${{ matrix.os_ver }}04-${{ matrix.bin }}-x86_64.zip" >> $GITHUB_OUTPUT + shell: bash - name: cmake-build run: | cd cfd-sys/cfd-cmake @@ -157,18 +143,13 @@ jobs: zip -r cfd.zip usr echo "---- dump zip file ----" ls -l - - name: output url - id: get_url - run: echo "upload_url=${{ needs.create_releases.outputs.release_url }}" >> $GITHUB_OUTPUT - - name: Upload Release Asset Ubuntu - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: rename asset + run: mv ./cfd-sys/cfd-cmake/dist/cfd.zip ${{ steps.asset_name.outputs.ASSET_NAME }} + - name: Upload Release Asset + id: upload-release-asset + uses: softprops/action-gh-release@v1 with: - upload_url: ${{ steps.get_url.outputs.upload_url }} - asset_path: ./cfd-sys/cfd-cmake/dist/cfd.zip - asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-ubuntu${{ matrix.os_ver }}04-${{ matrix.bin }}-x86_64.zip - asset_content_type: application/zip + files: ${{ steps.asset_name.outputs.ASSET_NAME }} upload-object-alpine: name: upload-object-alpine @@ -177,7 +158,7 @@ jobs: strategy: fail-fast: false matrix: - alpine: ['3.14', '3.15', '3.16', '3.17'] + alpine: ['3.15', '3.16', '3.17', '3.18'] steps: - name: checkout @@ -185,13 +166,12 @@ jobs: - 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-sys-${{ 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.14 - if: matrix.alpine == '3.14' - uses: docker://alpine:3.14 - with: - entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh - name: docker setup 3.15 if: matrix.alpine == '3.15' uses: docker://alpine:3.15 @@ -207,6 +187,11 @@ jobs: 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 ----" @@ -222,20 +207,13 @@ jobs: sudo cp -rp /tmp/cfd/cfd.zip $GITHUB_WORKSPACE/dist/cfd.zip echo "---- dump zip file ----" sudo ls -l /tmp/cfd - - name: output url - id: get_url - run: echo "upload_url=${{ needs.create_releases.outputs.release_url }}" >> $GITHUB_OUTPUT + - name: rename asset + run: mv /tmp/cfd/cfd.zip ${{ steps.asset_name.outputs.ASSET_NAME }} - name: Upload Release Asset id: upload-release-asset - # if: success() - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: - upload_url: ${{ steps.get_url.outputs.upload_url }} - asset_path: /tmp/cfd/cfd.zip - asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-alpine${{ matrix.alpine }}_x86_64.zip - asset_content_type: application/zip + files: ${{ steps.asset_name.outputs.ASSET_NAME }} upload-object-macos: name: upload-object-macos @@ -244,21 +222,23 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-11, macos-12] - xcode_version: ['11.7', '12.5.1', '13.4.1'] + xcode: ['12.5.1', '13.2.1', '13.4.1', '14.2', '14.3.1'] shared: [on, off] include: - - shared: on - suffix: - - shared: off - suffix: -static - exclude: - - xcode_version: '11.7' + - xcode: '12.5.1' + os: macos-11 + - xcode: '13.2.1' + os: macos-11 + - xcode: '13.4.1' os: macos-12 - - xcode_version: '12.5.1' + - xcode: '14.2' os: macos-12 - - xcode_version: '13.4.1' - os: macos-11 + - xcode: '14.3.1' + os: macos-13 + - shared: on + suffix: '' + - shared: off + suffix: '-static' steps: - name: checkout @@ -286,8 +266,8 @@ jobs: echo "---- dump zip file ----" ls -l cd ../../.. - mv ./cfd-sys/cfd-cmake/dist/cfd.zip ./cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode_version }}${{ matrix.suffix }}-x86_64.zip + mv ./cfd-sys/cfd-cmake/dist/cfd.zip ./cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode }}${{ matrix.suffix }}-x86_64.zip - name: Upload Release Asset Ubuntu uses: softprops/action-gh-release@v1 with: - files: cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode_version }}${{ matrix.suffix }}-x86_64.zip + files: cfd-sys-${{ steps.get_version.outputs.VERSION }}-osx-xcode${{ matrix.xcode }}${{ matrix.suffix }}-x86_64.zip