Skip to content

Update GlennGUI.Mac.csproj #149

Update GlennGUI.Mac.csproj

Update GlennGUI.Mac.csproj #149

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- 'README.md'
jobs:
cli:
strategy:
fail-fast: false
matrix:
#os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
configuration: [Release]
include:
- os: ubuntu-latest
COMMAND: GlennCLI.csproj -p:PublishSingleFile=true -p:DebugType=embedded -r linux-x64 --no-self-contained
ARTIFACT: GlennCLI/bin/Release/net6.0/linux-x64/publish/
#- os: macOS-latest
# COMMAND: GlennCLI.csproj -r osx-x64 --no-self-contained
# ARTIFACT: GlennCLI/bin/Release/net6.0/osx-x64/publish
- os: windows-latest
COMMAND: GlennCLI.csproj -p:PublishSingleFile=true -p:DebugType=embedded -r win-x86 --no-self-contained
ARTIFACT: GlennCLI\bin\Release\net6.0\win-x86\publish
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Restore dependencies
working-directory: ./GlennCLI
run: dotnet restore
- name: Build
working-directory: ./GlennCLI
run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}" /p:WarningLevel=3
# Steps for uploading artifacts.
- name: Zip to Archive
run: 7z a -tzip ${{ matrix.os }}.zip ./${{ matrix.ARTIFACT }}
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: CLI-${{ matrix.os }}
path: ${{ matrix.os }}.zip
gui:
strategy:
fail-fast: false
matrix:
#os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
configuration: [Release]
include:
- os: ubuntu-latest
COMMAND: GlennGUI.Gtk.csproj -p:PublishSingleFile=true -p:DebugType=embedded -r linux-x64 --no-self-contained
ARTIFACT: GlennGUI.Gtk/bin/Release/net6.0/linux-x64/publish/
POSTBUILD: echo "nothing to do"
DIR: GlennGUI.Gtk
#- os: macOS-latest
# COMMAND: GlennGUI.Mac.csproj -o builds/macOS-latest
# ARTIFACT: builds/macOS-latest
# POSTBUILD: rm -r builds/macOS-latest/* && mv GlennGUI.Mac/bin/Release/net6.0-macos/GlennGUI.Mac.app builds/macOS-latest/GlennGUI.Mac.app
# DIR: GlennGUI.Mac
- os: windows-latest
COMMAND: GlennGUI.Wpf.csproj -p:PublishSingleFile=true -p:DebugType=embedded -r win-x86 --no-self-contained
ARTIFACT: GlennGUI.Wpf\bin\Release\net6.0-windows\win-x86\publish
POSTBUILD: echo "nothing to do"
DIR: GlennGUI.Wpf
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Install Mac workload
run: dotnet workload install macos
- name: Restore dependencies
working-directory: ./GlennGUI/${{ matrix.DIR }}
run: dotnet restore
- name: Build
working-directory: ./GlennGUI/${{ matrix.DIR }}
run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}" /p:WarningLevel=3
- name: Post-Build
run: |
${{ matrix.POSTBUILD }}
# Steps for uploading artifacts.
- name: Zip to Archive
run: 7z a -tzip ${{ matrix.os }}.zip ./GlennGUI/${{ matrix.ARTIFACT }}
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: GUI-${{ matrix.os }}
path: ${{ matrix.os }}.zip
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Install Mac workload
run: dotnet workload install macos && dotnet workload restore
- name: Restore dependencies
working-directory: ./GlennLibTests/
run: dotnet restore
- name: Test
run: dotnet test