Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions Linux/gcc and Windows/VS2022 CI builds #18

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Linux, gcc

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- { arch: ia32, gcc: multilib, cross_compile: }
- { arch: x86_64, gcc: multilib, cross_compile: }
- { arch: aa64, gcc: aarch64-linux-gnu, cross_compile: aarch64-linux-gnu- }
- { arch: arm, gcc: arm-linux-gnueabihf, cross_compile: arm-linux-gnueabihf- }
- { arch: riscv64, gcc: riscv64-linux-gnu, cross_compile: riscv64-linux-gnu- }
# - { arch: mips64el, gcc: mips64el-linux-gnuabi64, cross_compile: mips64el-linux-gnuabi64- }
# - { arch: loongarch64, gcc: loongarch64-linux-gnu, cross_compile: loongarch64-linux-gnu- }

steps:
- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install gcc-${{ matrix.gcc }}

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Build
run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.cross_compile }}
37 changes: 37 additions & 0 deletions .github/workflows/vs2022.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Windows, VS2022

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
SOLUTION_FILE_PATH: ./gnu-efi.sln

jobs:
VS2022-Build:
runs-on: windows-latest

strategy:
matrix:
TARGET_PLATFORM: [x64, ia32, aa64, arm]
CONFIGURATION: [Debug, Release]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64

- name: Build
shell: cmd
run: msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=${{ matrix.CONFIGURATION }},Platform=${{ matrix.TARGET_PLATFORM }}
13 changes: 13 additions & 0 deletions .vs/apps/AllocPages.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\.vs\apps\common.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}</ProjectGuid>
<RootNamespace>AllocPages</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>AllocPages</ProjectName>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\apps\AllocPages.c" />
</ItemGroup>
</Project>
18 changes: 18 additions & 0 deletions .vs/apps/AllocPages.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\apps\AllocPages.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions .vs/apps/FreePages.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\.vs\apps\common.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{627A0AFB-B9A9-4FC9-9D6B-4D9E227A0666}</ProjectGuid>
<RootNamespace>FreePages</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>FreePages</ProjectName>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\apps\FreePages.c" />
</ItemGroup>
</Project>
18 changes: 18 additions & 0 deletions .vs/apps/FreePages.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\apps\FreePages.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
45 changes: 45 additions & 0 deletions .vs/apps/_gen_vcxproj.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
$Source = "AllocPages"
$EfiArchName = @{
"x64" = "x64"
"Win32" = "ia32"
"ARM64" = "aa64"
"ARM" = "arm"
}
$i = 0
$sln = (Get-Content ..\..\gnu-efi.sln) -as [collections.arraylist]
Get-ChildItem "..\..\apps" -Filter *.c |
Foreach-Object {
if ($_.BaseName -ne $Source) {
$guid = [guid]::NewGuid().ToString().ToUpper()
Write-Host $guid = $_.BaseName
copy "$Source.vcxproj" "$($_.BaseName).vcxproj"
copy "$Source.vcxproj.filters" "$($_.BaseName).vcxproj.filters"
copy "$Source.vcxproj.user" "$($_.BaseName).vcxproj.user"
(Get-Content "$($_.BaseName).vcxproj").Replace("DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE", $guid).Replace($Source, $_.BaseName) | Set-Content "$($_.BaseName).vcxproj"
(Get-Content "$($_.BaseName).vcxproj.filters").Replace($Source, $_.BaseName) | Set-Content "$($_.BaseName).vcxproj.filters"
$line = 14 + 5 * $i
$sln.insert($line,"Project(""{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"") = ""$($_.BaseName)"", "".vs\apps\$($_.BaseName).vcxproj"", ""{$guid}""")
$line++
$sln.insert($line," ProjectSection(ProjectDependencies) = postProject")
$line++
$sln.insert($line," {3135D563-9596-4584-9ED6-616ADEC52974} = {3135D563-9596-4584-9ED6-616ADEC52974}")
$line++
$sln.insert($line," EndProjectSection")
$line++
$sln.insert($line,"EndProject")
$line++
$line += 44 + 16 * $i
foreach ($Build in @("Debug", "Release")) {
foreach ($Arch in @("ARM64", "ARM", "Win32", "x64")) {
foreach ($Cfg in @("ActiveCfg", "Build.0")) {
$sln.insert($line, " {$guid}.$Build|$($EfiArchName.$Arch).$Cfg = $Build|$Arch")
$line++
}
}
}
$line += 6 + $i
$sln.insert($line, " {$guid} = {DF105116-5A3A-4D48-AB1D-7221690ED545}")
$i++
}
}
$sln | Set-Content ..\..\gnu-efi.sln
13 changes: 13 additions & 0 deletions .vs/apps/bltgrid.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\.vs\apps\common.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{7FD7832D-F7C7-4B3F-9B6D-8A48BDC74E6C}</ProjectGuid>
<RootNamespace>bltgrid</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>bltgrid</ProjectName>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\apps\bltgrid.c" />
</ItemGroup>
</Project>
18 changes: 18 additions & 0 deletions .vs/apps/bltgrid.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\apps\bltgrid.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
Loading