From db4eef015b2de25f0d80421b7e869dd3ba4b0d08 Mon Sep 17 00:00:00 2001 From: ParticleG Date: Sun, 4 Aug 2024 20:25:15 +0800 Subject: [PATCH] - Update workflow --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18aab9f..accfa62 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: COMMIT_HASH=$(git rev-parse --short ${{ GITHUB.SHA }}) echo "commitHash=$COMMIT_HASH" >> $GITHUB_OUTPUT - build: + build-linux: runs-on: ubuntu-24.04 needs: get-info env: @@ -50,8 +50,8 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: Studio26F_${{ needs.get-info.outputs.commitHash }}_${{ GITHUB.RUN_NUMBER }}_${{ matrix.config }} - path: "${{ env.OUTPUT_FOLDER }}" + name: Studio26F_${{ needs.get-info.outputs.commitHash }}_${{ GITHUB.RUN_NUMBER }}_Linux_${{ matrix.config }} + path: "${{ env.OUTPUT_FOLDER }}/Studio26F" - name: Prepare for release if: ${{ (startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v')) && matrix.config == 'release'}} shell: bash @@ -65,4 +65,31 @@ jobs: allowUpdates: true artifacts: | ${{ env.RELEASE_FOLDER }}/* - prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }} \ No newline at end of file + prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }} + + build-windows: + runs-on: windows-latest + needs: get-info + env: + OUTPUT_FOLDER: ./build + RELEASE_FOLDER: ./release + strategy: + matrix: + config: [ Debug, Release ] + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Setup CMake + uses: lukka/get-cmake@latest + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 + - name: CMake Configure and Build + run: | + cmake -S "${{ github.workspace }}" -B "${{ github.workspace }}/${{ env.OUTPUT_FOLDER }}" + cmake --build "${{ github.workspace }}/${{ env.OUTPUT_FOLDER }}" --target Studio26F --config ${{ matrix.config }} + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: Studio26F_${{ needs.get-info.outputs.commitHash }}_${{ GITHUB.RUN_NUMBER }}_Windows_${{ matrix.config }} + path: "${{ env.OUTPUT_FOLDER }}"