Debian NMU 1.13.1-1.1 (by Adrian Bunk) #426
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
# Run default OSes for each PR, push event or a new tag, | |
# checks basic builds with various compilers and executes all sets of tests. | |
name: PMDK | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
GITHUB_REPO: pmem/pmdk | |
DOCKER_REPO: ghcr.io/pmem/pmdk | |
jobs: | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
env: | |
# use org's Private Access Token to log in to GitHub Container Registry | |
GH_CR_USER: ${{ secrets.GH_CR_USER }} | |
GH_CR_PAT: ${{ secrets.GH_CR_PAT }} | |
DOC_UPDATE_GITHUB_TOKEN: ${{ secrets.DOC_UPDATE_GITHUB_TOKEN }} | |
HOST_WORKDIR: /home/runner/work/pmdk/pmdk | |
WORKDIR: utils/docker | |
PMDK_CC: gcc | |
PMDK_CXX: g++ | |
MAKE_PKG: 0 | |
VALGRIND: 1 | |
SRC_CHECKERS: 0 | |
strategy: | |
matrix: | |
CONFIG: [ | |
"N=1 OS=ubuntu OS_VER=22.04 FAULT_INJECTION=1 TEST_BUILD=debug PUSH_IMAGE=1", | |
"N=2 OS=ubuntu OS_VER=22.04 FAULT_INJECTION=1 TEST_BUILD=nondebug UBSAN=1", | |
"N=3 OS=ubuntu OS_VER=22.04 PMDK_CC=clang PMDK_CXX=clang++ TEST_BUILD=debug SRC_CHECKERS=1", | |
"N=4 OS=ubuntu OS_VER=22.04 PMDK_CC=clang PMDK_CXX=clang++ TEST_BUILD=nondebug AUTO_DOC_UPDATE=1", | |
"N=5 OS=ubuntu OS_VER=22.04 COVERAGE=1 FAULT_INJECTION=1 TEST_BUILD=debug", | |
] | |
steps: | |
- name: Clone the git repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 50 | |
- name: Get system information | |
run: ./$WORKDIR/get-system-info.sh | |
- name: Pull or rebuild the image | |
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh | |
- name: Run the build | |
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build-CI.sh | |
windows: | |
name: Windows | |
runs-on: windows-2022 | |
env: | |
solutionname: PMDK.sln | |
ex_solutionname: Examples.sln | |
perl: "C:\\Strawberry\\perl\\bin" | |
strategy: | |
matrix: | |
CONFIG: [Debug, Release] | |
steps: | |
- name: Update Path | |
run: | | |
echo "${env:perl}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Clone the git repo | |
uses: actions/checkout@v3 | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
with: | |
msbuild-architecture: x64 | |
- name: Unshallow it | |
run: git fetch --prune --unshallow | |
- name: Various debug checks (cstyle, whitespace etc.) | |
run: | | |
if ("${{ matrix.CONFIG }}" -eq "Release") | |
{ | |
Install-Module PsScriptAnalyzer -Force | |
utils/CSTYLE.ps1 | |
if ($LASTEXITCODE -ne 0) { | |
exit 1 | |
} | |
utils/CHECK_WHITESPACE.ps1 | |
if ($LASTEXITCODE -ne 0) { | |
exit 1 | |
} | |
utils/ps_analyze.ps1 | |
if ($LASTEXITCODE -ne 0) { | |
exit 1 | |
} | |
perl utils/sort_solution check | |
if ($LASTEXITCODE -ne 0) { | |
exit 1 | |
} | |
./utils/check_sdk_version.py -d . | |
if ($LASTEXITCODE -ne 0) { | |
exit 1 | |
} | |
} | |
- name: Build | |
run: | | |
msbuild src\$Env:solutionname -property:Configuration=${{ matrix.CONFIG }} -m -v:m | |
msbuild src\examples\$Env:ex_solutionname -property:Configuration=${{ matrix.CONFIG }} -m -v:m | |
- name: Create ZIP archive | |
run: utils/CREATE-ZIP.ps1 -b ${{ matrix.CONFIG }} | |
- name: Run tests | |
shell: powershell | |
run: | | |
if ($true) { | |
cd src\test | |
echo "`$Env:NON_PMEM_FS_DIR = `"C:\temp`"" >> testconfig.ps1 | |
echo "`$Env:PMEM_FS_DIR = `"C:\temp`"" >> testconfig.ps1 | |
echo "`$Env:PMEM_FS_DIR_FORCE_PMEM = `"1`"" >> testconfig.ps1 | |
echo "`$Env:PMDK_NO_ABORT_MSG = `"1`"" >> testconfig.ps1 | |
echo "`$Env:TM = `"1`"" >> testconfig.ps1 | |
write-output "config = { | |
'unittest_log_level': 1, | |
'cacheline_fs_dir': 'C:\\temp', | |
'force_cacheline': True, | |
'page_fs_dir': 'C:\\temp', | |
'force_page': False, | |
'byte_fs_dir': 'C:\\temp', | |
'force_byte': True, | |
'tm': True, | |
'test_type': 'check', | |
'granularity': 'all', | |
'fs_dir_force_pmem': 1, | |
'keep_going': False, | |
'timeout': '4m', | |
'build': 'debug', | |
'force_enable': None, | |
'fail_on_skip': False, | |
'enable_admin_tests': False, | |
}" | out-file "testconfig.py" -encoding utf8 | |
if ("${{ matrix.CONFIG }}" -eq "Debug") { | |
./RUNTESTS.ps1 -b debug -o 4m | |
if ($?) { | |
python ./RUNTESTS.py -b debug | |
} | |
} | |
if ("${{ matrix.CONFIG }}" -eq "Release") { | |
./RUNTESTS.ps1 -b nondebug -o 4m | |
if ($?) { | |
python ./RUNTESTS.py -b release | |
} | |
} | |
} |