|
| 1 | +on: workflow_dispatch |
| 2 | + |
| 3 | +jobs: |
| 4 | + pr-test: |
| 5 | + runs-on: ${{ matrix.os.runs-on }} |
| 6 | + |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + os: |
| 10 | + - runs-on: windows-latest |
| 11 | + arch: win-x64 |
| 12 | + - runs-on: macos-13 |
| 13 | + arch: osx-x64 |
| 14 | + - runs-on: ubuntu-latest |
| 15 | + arch: linux-x64 |
| 16 | + |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + - uses: actions/setup-dotnet@v4 |
| 20 | + with: |
| 21 | + dotnet-version: "6.0.x" |
| 22 | + - name: restore |
| 23 | + run: dotnet restore OpenUtau -r ${{ matrix.os.arch }} |
| 24 | + - name: test |
| 25 | + run: dotnet test OpenUtau.Test |
| 26 | + |
| 27 | + - name: build non-mac |
| 28 | + run: dotnet publish OpenUtau -c Release -r ${{ matrix.os.arch }} --self-contained true -o bin/${{ matrix.os.arch }}/ |
| 29 | + if: ${{ matrix.os.arch }} != 'osx-x64' |
| 30 | + - name: Upload dotnet test results |
| 31 | + uses: actions/upload-artifact@v4 |
| 32 | + with: |
| 33 | + name: OpenUtau-${{ matrix.os.arch }} |
| 34 | + path: bin/${{ matrix.os.arch }} |
| 35 | + if: ${{ matrix.os.arch }} != 'osx-x64' |
| 36 | + |
| 37 | + - name: setup node.js |
| 38 | + uses: actions/setup-node@v4 |
| 39 | + if: ${{ matrix.os.arch }} == 'osx-x64' |
| 40 | + - name: build mac |
| 41 | + run: | |
| 42 | + dotnet msbuild OpenUtau -t:BundleApp -p:Configuration=Release -p:RuntimeIdentifier=osx.10.14-x64 -p:UseAppHost=true -p:OutputPath=../bin/${{ matrix.os.arch }}/ |
| 43 | + cp OpenUtau/Assets/OpenUtau.icns bin/${{ matrix.os.arch }}/publish/OpenUtau.app/Contents/Resources/ |
| 44 | + npm install -g create-dmg |
| 45 | + create-dmg bin/osx-x64/publish/OpenUtau.app |
| 46 | + mv *.dmg OpenUtau-osx-x64.dmg |
| 47 | + codesign -fvs - OpenUtau-osx-x64.dmg |
| 48 | + if: ${{ matrix.os.arch }} == 'osx-x64' |
| 49 | + - name: upload mac |
| 50 | + uses: actions/upload-artifact@v4 |
| 51 | + with: |
| 52 | + name: OpenUtau-${{ matrix.os.arch }} |
| 53 | + path: OpenUtau-osx-x64.dmg |
| 54 | + if: ${{ matrix.os.arch }} == 'osx-x64' |
0 commit comments