mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-12-16 07:05:12 +02:00
update build scripts, add unit tests, pidgen2 needs polishing, confid is wip
This commit is contained in:
116
.github/workflows/dos-djgpp.yml
vendored
116
.github/workflows/dos-djgpp.yml
vendored
@@ -23,21 +23,35 @@ name: C/C++ CI (DOS DJGPP)
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CC: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-gcc
|
||||
CXX: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-g++
|
||||
CMAKE_FIND_ROOT_PATH: ${{ github.workspace }}/djgpp
|
||||
WATT_ROOT: ${{ github.workspace }}/djgpp/watt32
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CC: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-gcc
|
||||
CXX: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-g++
|
||||
CMAKE_FIND_ROOT_PATH: ${{ github.workspace }}/djgpp
|
||||
GCC_EXEC_PREFIX: ${{ github.workspace }}/lib/gcc/
|
||||
DJDIR: ${{ github.workspace }}/djgpp/i586-pc-msdosdjgpp
|
||||
PATH: ${{ github.workspace }}/djgpp/i586-pc-msdosdjgpp/bin/:${{ github.workspace }}/djgpp/bin/:${PATH}
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up CPM cache
|
||||
id: cache-cpm
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/.cpm-cache
|
||||
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cpm-
|
||||
|
||||
- name: Setup build environment
|
||||
run: |
|
||||
@@ -46,24 +60,17 @@ jobs:
|
||||
|
||||
- name: Download and Setup DJGPP Toolchain
|
||||
run: |
|
||||
pushd ${{ github.workspace }}
|
||||
wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
|
||||
tar xjf djgpp-linux64-gcc1220.tar.bz2
|
||||
cd ${{ github.workspace }}/djgpp
|
||||
git clone https://github.com/UMSKT/Watt-32.git watt32
|
||||
cd watt32/util
|
||||
make clean && make linux
|
||||
cd ../src
|
||||
source ${{ github.workspace }}/djgpp/setenv
|
||||
./configur.sh djgpp
|
||||
make -f djgpp.mak
|
||||
ln -s ${WATT_ROOT}/lib/libwatt.a ${CMAKE_FIND_ROOT_PATH}/lib
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
source ${{ github.workspace }}/djgpp/setenv
|
||||
cmake -DDJGPP_WATT32=${WATT_ROOT}/lib/libwatt.a -DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH} -DCMAKE_BUILD_TYPE=Release build/
|
||||
cmake --build build/
|
||||
- name: Build UMSKT for MSDOS via DJGPP
|
||||
uses: threeal/cmake-action@v1.3.0
|
||||
with:
|
||||
options: UMSKT_DJGPP_COMPILE=On CMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH} CMAKE_BUILD_TYPE=Release
|
||||
build-dir: build
|
||||
c-compiler: ${CC}
|
||||
cxx-compiler: ${CXX}
|
||||
build-args: -j 2
|
||||
|
||||
- name: Move executable to upload directory
|
||||
run: |
|
||||
@@ -71,7 +78,68 @@ jobs:
|
||||
mv build/umskt.exe build/actions_upload/
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: UMSKT-DOS
|
||||
path: build/actions_upload
|
||||
|
||||
build-dos-win32-combined:
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
# https://github.com/actions/runner-images/issues/6067#issuecomment-1213069040
|
||||
- name: Install Windows XP Support for Visual Studio
|
||||
run: |
|
||||
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
|
||||
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
|
||||
$componentsToAdd = @(
|
||||
"Microsoft.VisualStudio.Component.WinXP"
|
||||
)
|
||||
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
|
||||
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
|
||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
|
||||
if ($process.ExitCode -eq 0)
|
||||
{
|
||||
Write-Host "components have been successfully added"
|
||||
Get-ChildItem C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.Windows.XPSupport.*
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "components were not installed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up CPM cache
|
||||
id: cache-cpm
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/.cpm-cache
|
||||
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cpm-
|
||||
|
||||
- name: Download Built DOS Artifact
|
||||
uses: actions/download-artifact@v4.1.2
|
||||
with:
|
||||
name: UMSKT-DOS
|
||||
|
||||
- name: Configure and build UMSKT for DOS+Win32
|
||||
uses: threeal/cmake-action@v1.3.0
|
||||
with:
|
||||
options: UMSKT_MSVC_WINXP=On CMAKE_BUILD_TYPE=Release CPM_SOURCE_CACHE=${{ github.workspace }}/.cpm-cache UMSKT_MSVC_MSDOS_STUB=${{ github.workspace }}/umskt.exe
|
||||
generator: "Visual Studio 17 2022"
|
||||
args: -A "Win32" -T "v141_xp"
|
||||
run-build: true
|
||||
build-args: "--config Release -j 2"
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: UMSKT-DOS+Win32
|
||||
path: build/Release
|
||||
88
.github/workflows/freebsd.yml
vendored
88
.github/workflows/freebsd.yml
vendored
@@ -17,46 +17,58 @@
|
||||
#
|
||||
# @FileCreated by techguy16 on 07/23/2023
|
||||
# @Maintainer techguy16
|
||||
|
||||
name: C/C++ CI (FreeBSD)
|
||||
|
||||
on:
|
||||
|
||||
name: C/C++ CI (FreeBSD)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
||||
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: build-x86_64
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build & Test in FreeBSD
|
||||
id: test
|
||||
uses: vmactions/freebsd-vm@v1
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y cmake git bash
|
||||
|
||||
run: |
|
||||
mkdir build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release build/
|
||||
cmake --build build/
|
||||
|
||||
- name: Move files to correct directory
|
||||
run: |
|
||||
mkdir -p build/actions_upload
|
||||
mv build/umskt build/actions_upload/umskt
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: UMSKT-FreeBSD
|
||||
path: build/actions_upload
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: build-x86_64
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up CPM cache
|
||||
id: cache-cpm
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/.cpm-cache
|
||||
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cpm-
|
||||
|
||||
- name: Build & Test in FreeBSD
|
||||
id: test
|
||||
uses: vmactions/freebsd-vm@v1.0.6
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y cmake git bash
|
||||
|
||||
run: |
|
||||
mkdir build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCPM_SOURCE_CACHE= ${{ github.workspace }}/.cpm-cache -DBUILD_TESTING=On -B build/
|
||||
cmake --build build/ -j 2
|
||||
cd build
|
||||
ctest
|
||||
|
||||
- name: Move files to correct directory
|
||||
run: |
|
||||
mkdir -p build/actions_upload
|
||||
mv build/umskt build/actions_upload/umskt
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: UMSKT-FreeBSD
|
||||
path: build/actions_upload
|
||||
|
||||
74
.github/workflows/linux.yml
vendored
74
.github/workflows/linux.yml
vendored
@@ -23,7 +23,10 @@ name: C/C++ CI (Linux)
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -35,36 +38,53 @@ jobs:
|
||||
- x86
|
||||
- x86_64
|
||||
- aarch64
|
||||
- armhf
|
||||
- armv7
|
||||
- ppc64le
|
||||
- riscv64
|
||||
- s390x
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Setup latest Alpine Linux for ${{ matrix.arch }}
|
||||
uses: jirutka/setup-alpine@v1
|
||||
with:
|
||||
packages: >
|
||||
bash
|
||||
build-base
|
||||
cmake
|
||||
git
|
||||
musl-dev
|
||||
arch: ${{ matrix.arch }}
|
||||
shell-name: alpine-target.sh
|
||||
- name: Set up CPM cache
|
||||
id: cache-cpm
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/.cpm-cache
|
||||
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cpm-
|
||||
|
||||
- name: Configure and build UMSKT
|
||||
uses: threeal/cmake-action@v1.3.0
|
||||
with:
|
||||
options: MUSL_STATIC=ON CMAKE_BUILD_TYPE=Release
|
||||
run-build: true
|
||||
shell: alpine-target.sh {0}
|
||||
- name: Setup latest Alpine Linux for ${{ matrix.arch }}
|
||||
uses: jirutka/setup-alpine@v1
|
||||
with:
|
||||
packages: >
|
||||
bash
|
||||
build-base
|
||||
cmake
|
||||
git
|
||||
musl-dev
|
||||
arch: ${{ matrix.arch }}
|
||||
shell-name: alpine-target.sh
|
||||
|
||||
- name: Move files to correct directory
|
||||
run: |
|
||||
- name: Configure and build UMSKT
|
||||
uses: threeal/cmake-action@v1.3.0
|
||||
with:
|
||||
options: UMSKT_MUSL_STATIC=ON CMAKE_BUILD_TYPE=Release CPM_SOURCE_CACHE=${{ github.workspace }}/.cpm-cache BUILD_TESTING=On
|
||||
run-build: true
|
||||
build-args: -j 2
|
||||
run-test: true
|
||||
shell: alpine-target.sh {0}
|
||||
|
||||
- name: Move files to correct directory
|
||||
run: |
|
||||
mkdir -p build/actions_upload
|
||||
mv build/umskt build/actions_upload/umskt
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: UMSKT-linux-${{ matrix.arch }}-static
|
||||
path: build/actions_upload
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: UMSKT-linux-${{ matrix.arch }}-static
|
||||
path: build/actions_upload
|
||||
|
||||
31
.github/workflows/macos.yml
vendored
31
.github/workflows/macos.yml
vendored
@@ -23,7 +23,10 @@ name: C/C++ CI (macOS)
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**' ] # If only these files are edited, skip
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -32,17 +35,29 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- { name: arm64;x86_64, displayName: all-x86_64_arm64}
|
||||
- { name: arm64;x86_64, displayName: all-x86_64_arm64 }
|
||||
- { name: x86_64, displayName: x86_64 }
|
||||
- { name: arm64, displayName: arm64 }
|
||||
steps:
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Configure and build UMSKT ${{ matrix.arch.displayName }}
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch.name }} build/
|
||||
cmake --build build/
|
||||
- name: Set up CPM cache
|
||||
id: cache-cpm
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/.cpm-cache
|
||||
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cpm-
|
||||
|
||||
- name: Configure and build UMSKT for ${{ matrix.arch.displayName }}
|
||||
uses: threeal/cmake-action@v1.3.0
|
||||
with:
|
||||
options: MUSL_STATIC=ON CMAKE_BUILD_TYPE=Release CPM_SOURCE_CACHE=${{ github.workspace }}/.cpm-cache CMAKE_OSX_ARCHITECTURES=${{ matrix.arch.name }} BUILD_TESTING=On
|
||||
run-build: true
|
||||
build-args: -j 2
|
||||
run-test: true
|
||||
|
||||
- name: Move files to correct directory
|
||||
run: |
|
||||
@@ -50,7 +65,7 @@ jobs:
|
||||
mv build/umskt build/actions_upload/umskt
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: UMSKT-macOS-${{ matrix.arch.displayName }}
|
||||
path: build/actions_upload
|
||||
|
||||
35
.github/workflows/windows.yml
vendored
35
.github/workflows/windows.yml
vendored
@@ -24,11 +24,17 @@ on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [ { name: Win32, displayName: x86 }, { name: x64, displayName: x64 } ]
|
||||
steps:
|
||||
# https://github.com/actions/runner-images/issues/6067#issuecomment-1213069040
|
||||
- name: Install Windows XP Support for Visual Studio
|
||||
@@ -52,30 +58,33 @@ jobs:
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Set up CPM cache
|
||||
id: cache-cpm
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/.cpm-cache
|
||||
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cpm-
|
||||
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
needs: prepare
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [ { name: Win32, displayName: x86 }, { name: x64, displayName: x64} ]
|
||||
steps:
|
||||
- name: Configure and build UMSKT for ${{ matrix.values.displayName }}
|
||||
uses: threeal/cmake-action@v1.3.0
|
||||
with:
|
||||
options: CMAKE_BUILD_TYPE=Release
|
||||
options: CMAKE_BUILD_TYPE=Release CPM_SOURCE_CACHE=${{ github.workspace }}/.cpm-cache BUILD_TESTING=On
|
||||
generator: "Visual Studio 17 2022"
|
||||
args: -A "${{ matrix.arch.name }}" -T "v141_xp"
|
||||
run-build: true
|
||||
build-args: "--config Release"
|
||||
build-args: --config Release -j 2
|
||||
run-test: true
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: UMSKT-${{ matrix.values.displayName }}
|
||||
path: build/Release
|
||||
path: build/Release
|
||||
Reference in New Issue
Block a user