Skip to content

Commit

Permalink
Merge pull request #92 from ZehMatt/cmake-project
Browse files Browse the repository at this point in the history
Port project to CMake
  • Loading branch information
ZehMatt authored Dec 28, 2023
2 parents 7aac799 + 9ab8aa0 commit ab80ff5
Show file tree
Hide file tree
Showing 316 changed files with 1,878 additions and 133,337 deletions.
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

0 comments on commit ab80ff5

Please sign in to comment.