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

Port project to CMake #92

Merged
merged 16 commits into from
Dec 28, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
56 changes: 24 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,39 @@ jobs:
matrix:
dotnet-version: ['6.0.x']
platform:
- {arch: 'x86', dir: 'x32'}
- {arch: 'x64', dir: 'x64'}
- {build: 'Win32', arch: 'x32'}
- {build: 'x64', arch: 'x64'}
env:
CONFIGURATION: Release
PLATFORM: ${{ matrix.platform.arch }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Nuget dependencies
run: |
cd src
msbuild Dotx64Dbg.sln -t:restore -p:RestorePackagesConfig=true -maxcpucount:2 /m
IF %ERRORLEVEL% NEQ 0 (
ECHO MSBuild for Debug x64 returned error code %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
)
cd ..
uses: microsoft/[email protected]
- name: Build
run: |
cd src
msbuild Dotx64Dbg.sln /p:platform=${{ matrix.platform.arch }} /m
IF %ERRORLEVEL% NEQ 0 (
ECHO MSBuild for Debug x64 returned error code %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
)
cd ..
cmake . -B build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.platform.build }}
cmake --build build --config Release
- name: Tests
run: |
pushd .
cd bin\${{ matrix.platform.dir }}\tests
Tests.exe
cd bin\${{ matrix.platform.arch }}\tests
Dotx64DbgTests.exe
popd
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dotx64Dbg-${{ runner.os }}-${{ matrix.platform.arch }}
path: bin
path: bin/
if-no-files-found: error
package:
needs: build
name: Package
runs-on: ubuntu-latest
steps:
- name: Fetch artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Display structure of downloaded files
Expand All @@ -70,22 +56,28 @@ jobs:
- name: Merge artifacts
shell: bash
run: |
mkdir package
cp -R -n ./artifacts/dotx64Dbg-Windows-x64/* ./package/
cp -R -n ./artifacts/dotx64Dbg-Windows-x86/* ./package/
rm -R ./package/x32/tests
rm -R ./package/x64/tests
mkdir -p package/x64/plugins/Dotx64Dbg
mkdir -p package/x32/plugins/Dotx64Dbg
mkdir package/dotplugins
mkdir package/dotscripts
rm -R ./artifacts/dotx64Dbg-Windows-x32/x32/tests
rm -R ./artifacts/dotx64Dbg-Windows-x64/x64/tests
cp -R -n ./artifacts/dotx64Dbg-Windows-x64/x64/* ./package/x64/plugins/Dotx64Dbg
cp -R -n ./artifacts/dotx64Dbg-Windows-x32/x32/* ./package/x32/plugins/Dotx64Dbg
cp -R -n ./artifacts/dotx64Dbg-Windows-x32/dotplugins/* ./package/dotplugins/
cp -R -n ./artifacts/dotx64Dbg-Windows-x32/dotscripts/* ./package/dotscripts/
cp -R -n ./artifacts/dotx64Dbg-Windows-x32/dotx64dbg.json ./package/dotx64dbg.json
find ./package -type f -name '*.pdb' -delete
find ./package -type f -name '*.lib' -delete
find ./package -type f -name '*.exp' -delete
find ./package -type f -name '*.ilk' -delete
- name: Upload package (CI)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dotx64dbg
path: package
if-no-files-found: error
- name: Compress artifacts
- name: Compress package
uses: papeloto/action-zip@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
Expand Down
Loading