-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5c95f5
commit 4eac55f
Showing
4 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- without-aws | ||
#可以手动触发 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
build-type: [Debug, Release] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Qt | ||
if: matrix.os == 'windows-latest' | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
version: '6.7.2' | ||
target: 'desktop' | ||
arch: 'win64_mingw' | ||
cache: true | ||
|
||
- name: Setup Qt | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
version: '6.7.2' | ||
target: 'desktop' | ||
arch: 'linux_gcc_64' | ||
cache: true | ||
|
||
- uses: lukka/get-cmake@latest | ||
|
||
- name: Run CMake | ||
run: | | ||
cmake -B build -S . -G Ninja -DCMAKE_PREFIX_PATH=$env:QTDIR -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | ||
cmake --build build --config ${{ matrix.build-type }} --parallel 32 | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: build/${{ matrix.build-type }} | ||
name: ${{ matrix.build-type }}-${{ runner.os }} | ||
|
||
- name: Use windeployqt | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
windeployqt.exe build/${{ matrix.build-type }}/QSyncUi.exe | ||
- name: Upload artifacts | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: build/${{ matrix.build-type }} | ||
name: ${{ matrix.build-type }}-deployed | ||
|
||
|
||
- name: Compress artifacts | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
7z a build/${{ matrix.build-type }}.7z build/${{ matrix.build-type }} | ||
- name: Create Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: ext/${{github.ref_name}}-CHANGELOG | ||
|
||
- name: Upload Release Asset | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
build/${{ matrix.build-type }}-${{runner.os}}.7z | ||
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
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
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