runtime identifier not fx #375
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
name: 'Test & Build the desktop app' | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.gitignore' | |
- '**/*.gitattributes' | |
pull_request: | |
branches: | |
- master | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
# https://blog.taranissoftware.com/build-net-maui-apps-with-github-actions | |
jobs: | |
test-desktop: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup code, .NET and Android | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build --configuration Release BTCPayApp.Server | |
# Setup infrastructure | |
- name: Start containers | |
run: docker compose -f "submodules/btcpayserver/BTCPayServer.Tests/docker-compose.yml" up -d dev | |
- name: Start BTCPay | |
run: | | |
cd submodules/btcpayserver | |
nohup dotnet run -c Release --project BTCPayServer & | |
while ! curl -s http://localhost:14142/api/v1/health > /dev/null; do | |
echo "Waiting for BTCPay Server to start..." | |
sleep 10 | |
done | |
# Run tests | |
- name: Run tests | |
run: dotnet test -v n --logger "console;verbosity=normal" BTCPayApp.Tests | |
# Stop infrastructure | |
build-desktop-win: | |
runs-on: windows-latest | |
steps: | |
# Setup code, .NET and Android | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build win x64 | |
run: dotnet publish BTCPayApp.Photino/BTCPayApp.Photino.csproj -r win-x64 -c Debug -o publish/win-x64 | |
- name: Build win x86 | |
run: dotnet publish BTCPayApp.Photino/BTCPayApp.Photino.csproj -r win-x86 -c Debug -o publish/win-x86 | |
- name: Build win-arm64 | |
run: dotnet publish BTCPayApp.Photino/BTCPayApp.Photino.csproj -r win-arm64 -c Debug -o publish/win-arm64 | |
- name: Upload artifact win | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows build | |
path: | | |
publish/win-x64 | |
publish/win-x86 | |
publish/win-arm64 | |
build-desktop-linux: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup code, .NET and Android | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build linux x64 | |
run: dotnet publish BTCPayApp.Photino/BTCPayApp.Photino.csproj -r linux-x64 -c Debug -o publish/linux-x64 | |
- name: Build linux arm64 | |
run: dotnet publish BTCPayApp.Photino/BTCPayApp.Photino.csproj -r linux-arm64 -c Debug -o publish/linux-arm64 | |
- name: Upload artifact linux | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux build | |
path: | | |
publish/linux-x64 | |
publish/linux-arm64 |