Skip to content

Commit

Permalink
Adds a experimental build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stakira committed Jun 9, 2024
1 parent 3a9b41a commit 7603612
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on: workflow_dispatch

jobs:
pr-test:
runs-on: ${{ matrix.os.runs-on }}

strategy:
matrix:
os:
- runs-on: windows-latest
arch: win-x64
- runs-on: macos-13
arch: osx-x64
- runs-on: ubuntu-latest
arch: linux-x64

steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
- name: restore
run: dotnet restore OpenUtau -r ${{ matrix.os.arch }}
- name: test
run: dotnet test OpenUtau.Test

- name: build non-mac
run: dotnet publish OpenUtau -c Release -r ${{ matrix.os.arch }} --self-contained true -o bin/${{ matrix.os.arch }}/
if: ${{ matrix.os.arch }} != 'osx-x64'
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: OpenUtau-${{ matrix.os.arch }}
path: bin/${{ matrix.os.arch }}
if: ${{ matrix.os.arch }} != 'osx-x64'

- name: setup node.js
uses: actions/setup-node@v4
if: ${{ matrix.os.arch }} == 'osx-x64'
- name: build mac
run: |
dotnet msbuild OpenUtau -t:BundleApp -p:Configuration=Release -p:RuntimeIdentifier=osx.10.14-x64 -p:UseAppHost=true -p:OutputPath=../bin/${{ matrix.os.arch }}/
cp OpenUtau/Assets/OpenUtau.icns bin/${{ matrix.os.arch }}/publish/OpenUtau.app/Contents/Resources/
npm install -g create-dmg
create-dmg bin/osx-x64/publish/OpenUtau.app
mv *.dmg OpenUtau-osx-x64.dmg
codesign -fvs - OpenUtau-osx-x64.dmg
if: ${{ matrix.os.arch }} == 'osx-x64'
- name: upload mac
uses: actions/upload-artifact@v4
with:
name: OpenUtau-${{ matrix.os.arch }}
path: OpenUtau-osx-x64.dmg
if: ${{ matrix.os.arch }} == 'osx-x64'

0 comments on commit 7603612

Please sign in to comment.