Skip to content

Commit 1d299bc

Browse files
committed
use custom build
1 parent 1f53c3d commit 1d299bc

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ jobs:
6161

6262
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6363
# If this step fails, then you should remove it and run the build manually (see below)
64-
- name: Autobuild
65-
uses: github/codeql-action/autobuild@v2
64+
# - name: Autobuild
65+
# uses: github/codeql-action/autobuild@v2
6666

6767
# ℹ️ Command-line programs to run using the OS shell.
6868
# 📚 https://git.io/JvXDl
@@ -74,6 +74,9 @@ jobs:
7474
#- run: |
7575
# make bootstrap
7676
# make release
77+
- name: Custom build steps
78+
run: |
79+
./eng/BuildAllProjects.ps1
7780
7881
- name: Perform CodeQL Analysis
7982
uses: github/codeql-action/analyze@v2

eng/BuildAllProjects.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env pwsh
2+
# SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp>
3+
# SPDX-License-Identifier: MIT
4+
5+
$RepositoryRootDirectory = [System.IO.Path]::GetFullPath(
6+
[System.IO.Path]::Join($PSScriptRoot, "../")
7+
)
8+
9+
# download Smdn.MSBuild.ProjectAssets.* first
10+
dotnet restore ${RepositoryRootDirectory}eng\InstallProjectAssets.proj
11+
12+
# create a solution for the build target projects
13+
Set-Location $RepositoryRootDirectory
14+
15+
dotnet new sln
16+
17+
# add build target projects to the solution
18+
dotnet sln add ${RepositoryRootDirectory}src/Smdn.*/*.csproj
19+
20+
# restore dependencies
21+
dotnet restore
22+
23+
# then build all projects
24+
dotnet build --no-restore

eng/InstallProjectAssets.proj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp>
3+
SPDX-License-Identifier: MIT
4+
-->
5+
<!--
6+
This project file performs downloading packages defined by PackageDownload.
7+
Run `dotnet restore` to download the packages.
8+
-->
9+
<Project Sdk="Microsoft.Build.NoTargets/1.0.80">
10+
<Import Project="$(MSBuildThisFileDirectory)..\src\Directory.Build.props" />
11+
12+
<!-- ref: https://learn.microsoft.com/en-us/nuget/consume-packages/packagedownload-functionality -->
13+
<PropertyGroup>
14+
<NoBuild>true</NoBuild>
15+
<TargetFramework>netstandard1.0</TargetFramework>
16+
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
17+
</PropertyGroup>
18+
19+
<Import Project="$(MSBuildThisFileDirectory)..\src\Directory.Build.targets" />
20+
</Project>

0 commit comments

Comments
 (0)