Skip to content

Commit

Permalink
Add Faithlife.Build and CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrainger committed Feb 13, 2025
1 parent b07ceab commit eebdb81
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 22 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:
branches: [master]
tags-ignore: ['**']
pull_request:
workflow_dispatch:

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1

defaults:
run:
shell: pwsh

jobs:
build:
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install .NET
uses: actions/setup-dotnet@v4
- name: Restore
run: .\build.ps1 restore
- name: Build
run: .\build.ps1 build --skip restore
- name: Test
run: .\build.ps1 test --skip build
- name: Package
if: runner.os == 'Windows' && github.repository_owner == 'Faithlife' && github.ref == 'refs/heads/master'
env:
BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: .\build.ps1 package --skip test
22 changes: 0 additions & 22 deletions .github/workflows/stale.yml

This file was deleted.

1 change: 1 addition & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources />
</configuration>
12 changes: 12 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env pwsh
$ErrorActionPreference = 'Stop'
Push-Location $PSScriptRoot
try {
dotnet publish ./tools/Build/Build.csproj --artifacts-path ./artifacts --nologo --verbosity quiet
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dotnet ./artifacts/publish/Build/release_win-x64/Build.dll $args
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
finally {
Pop-Location
}
9 changes: 9 additions & 0 deletions sign.sln
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sign.SignatureProviders.Tru
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sign.SignatureProviders.TrustedSigning.Test", "test\Sign.SignatureProviders.TrustedSigning.Test\Sign.SignatureProviders.TrustedSigning.Test.csproj", "{A81695AF-088A-436A-9A38-4D0B0DB2D826}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build", "tools\Build\Build.csproj", "{FB7C373C-6BB8-6A25-C645-36371CEA966D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -97,6 +101,10 @@ Global
{A81695AF-088A-436A-9A38-4D0B0DB2D826}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A81695AF-088A-436A-9A38-4D0B0DB2D826}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A81695AF-088A-436A-9A38-4D0B0DB2D826}.Release|Any CPU.Build.0 = Release|Any CPU
{FB7C373C-6BB8-6A25-C645-36371CEA966D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB7C373C-6BB8-6A25-C645-36371CEA966D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB7C373C-6BB8-6A25-C645-36371CEA966D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB7C373C-6BB8-6A25-C645-36371CEA966D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -113,6 +121,7 @@ Global
{3AE48DC2-8422-4E3A-AFBC-12551D50DBCA} = {780818DD-6B52-47C8-AC54-71448DF822BD}
{060800AF-42FC-493C-AD99-9C87212BA969} = {92C73EE1-4EF3-4721-B6A9-9F458A673CA3}
{A81695AF-088A-436A-9A38-4D0B0DB2D826} = {780818DD-6B52-47C8-AC54-71448DF822BD}
{FB7C373C-6BB8-6A25-C645-36371CEA966D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7AA1043F-37A2-404F-8EC3-34C747C1CEB7}
Expand Down
16 changes: 16 additions & 0 deletions test/Sign.TestInfrastructure/NoTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE.txt file in the project root for more information.

using Xunit;

namespace Sign.TestInfrastructure;

public sealed class NoTests
{
[Fact]
public void Pass()
{
Assert.True(true);
}
}

0 comments on commit eebdb81

Please sign in to comment.