From 3bb888fc99e9d311a6d9dfc7a8852f6d0d63e94f Mon Sep 17 00:00:00 2001 From: Anichitei Ionel-Cristinel <49393881+ianichitei@users.noreply.github.com> Date: Fri, 20 Nov 2020 15:39:24 +0200 Subject: [PATCH 01/12] Try to add Windows binaries to a release --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10e9079..08bbfef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,9 @@ on: - 'bddisasm_test/**' - 'bdshemu_test/**' - 'LICENSE' + release: + types: [published] + jobs: Linux-build: @@ -81,6 +84,19 @@ jobs: run: MSBuild /t:Rebuild /p:Configuration=Release /p:Platform=x64 bddisasm.sln - name: Build bddisasm and bdshemu for Win32 run: MSBuild /t:Rebuild /p:Configuration=Release /p:Platform=Win32 bddisasm.sln + - name: Zip binaries + run: | + del bin\x64\Release\*.idb + del bin\Win32\Release\*.idb + tar.exe -acf x64-windows-release.zip bin\x64\Release + tar.exe -acf x86-windows-release.zip bin\Win32\Release + if: ${{ github.event_name == 'release' }} + - name: Release + uses: AButler/upload-release-assets@v2.0 + with: + files: 'x64-windows-release.zip;x86-windows-release.zip' + repo-token: ${{ secrets.GITHUB_TOKEN }} + Code-checks: From 892946cb079bd9dc7fafb9ec34b59b8ab9c1f452 Mon Sep 17 00:00:00 2001 From: Anichitei Ionel-Cristinel <49393881+ianichitei@users.noreply.github.com> Date: Fri, 20 Nov 2020 15:41:23 +0200 Subject: [PATCH 02/12] Run the release step only for releases --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08bbfef..d2988c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,13 +85,14 @@ jobs: - name: Build bddisasm and bdshemu for Win32 run: MSBuild /t:Rebuild /p:Configuration=Release /p:Platform=Win32 bddisasm.sln - name: Zip binaries + if: ${{ github.event_name == 'release' }} run: | del bin\x64\Release\*.idb del bin\Win32\Release\*.idb tar.exe -acf x64-windows-release.zip bin\x64\Release tar.exe -acf x86-windows-release.zip bin\Win32\Release - if: ${{ github.event_name == 'release' }} - name: Release + if: ${{ github.event_name == 'release' }} uses: AButler/upload-release-assets@v2.0 with: files: 'x64-windows-release.zip;x86-windows-release.zip' From fc85cdb20c290f2fb35bd58e4769d6ce2429ab7d Mon Sep 17 00:00:00 2001 From: Ionel-Cristinel ANICHITEI Date: Fri, 20 Nov 2020 15:56:24 +0200 Subject: [PATCH 03/12] Include disasmtool in the Windows build --- bddisasm.sln | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bddisasm.sln b/bddisasm.sln index e716baa..0e0d022 100644 --- a/bddisasm.sln +++ b/bddisasm.sln @@ -30,11 +30,15 @@ Global EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Debug|Win32.ActiveCfg = Debug|Win32 + {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Debug|Win32.Build.0 = Debug|Win32 {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Debug|x64.ActiveCfg = Debug|x64 + {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Debug|x64.Build.0 = Debug|x64 {94F1B65D-3305-4CCB-9DF1-50B56900D867}.DebugKernel|Win32.ActiveCfg = Debug|Win32 {94F1B65D-3305-4CCB-9DF1-50B56900D867}.DebugKernel|x64.ActiveCfg = Debug|x64 {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Release|Win32.ActiveCfg = Release|Win32 + {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Release|Win32.Build.0 = Release|Win32 {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Release|x64.ActiveCfg = Release|x64 + {94F1B65D-3305-4CCB-9DF1-50B56900D867}.Release|x64.Build.0 = Release|x64 {94F1B65D-3305-4CCB-9DF1-50B56900D867}.ReleaseKernel|Win32.ActiveCfg = Release|Win32 {94F1B65D-3305-4CCB-9DF1-50B56900D867}.ReleaseKernel|x64.ActiveCfg = Release|x64 {3653AA19-048B-410E-B5C4-FF78E1D84C12}.Debug|Win32.ActiveCfg = Debug|Win32 From 2dcac9a5d9e2ae751765c97bfdff2765be4d6a74 Mon Sep 17 00:00:00 2001 From: Ionel-Cristinel ANICHITEI Date: Fri, 20 Nov 2020 15:57:58 +0200 Subject: [PATCH 04/12] Remove iobj and ipdb files before creating the ZIPs --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2988c1..9e62287 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,11 @@ jobs: if: ${{ github.event_name == 'release' }} run: | del bin\x64\Release\*.idb + del bin\x64\Release\*.iobj + del bin\x64\Release\*.ipdb del bin\Win32\Release\*.idb + del bin\Win32\Release\*.iobj + del bin\Win32\Release\*.ipdb tar.exe -acf x64-windows-release.zip bin\x64\Release tar.exe -acf x86-windows-release.zip bin\Win32\Release - name: Release From 24234eb097ef965916636e3811cac0805010a412 Mon Sep 17 00:00:00 2001 From: Ionel-Cristinel ANICHITEI Date: Fri, 20 Nov 2020 16:04:50 +0200 Subject: [PATCH 05/12] Try to add a .deb to releases --- .github/workflows/ci.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e62287..af961c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,8 +34,8 @@ jobs: run: | mkdir build cd build - cmake .. - make + cmake .. -DINCLUDE_TOOL=y -DCMAKE_INSTALL_PREFIX=/usr + make bddisasm bdshemu cd - - name: Install rapidjson uses: actions/checkout@master @@ -54,13 +54,9 @@ jobs: cd .. - name: Build disasmtool_lix run: | - cd disasmtool_lix - mkdir _build - cd _build - cmake .. - make -j$(nproc) - cd .. - cd .. + cd build + make disasmtool + cd - - name: Install setuptools run: | python3 -m pip install --upgrade pip @@ -71,6 +67,12 @@ jobs: cd pybddisasm python3 setup.py build cd .. + - name: Release + if: ${{ github.event_name == 'release' }} + uses: AButler/upload-release-assets@v2.0 + with: + files: 'build/*.deb' + repo-token: ${{ secrets.GITHUB_TOKEN }} Windows-build: From 2c3535754f3d64e636062cf4db491f2c737719b7 Mon Sep 17 00:00:00 2001 From: Ionel-Cristinel ANICHITEI Date: Fri, 20 Nov 2020 16:07:24 +0200 Subject: [PATCH 06/12] Fix build --- .github/workflows/ci.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af961c3..cf2b428 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,13 +30,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Build bddisasm and bdshemu - run: | - mkdir build - cd build - cmake .. -DINCLUDE_TOOL=y -DCMAKE_INSTALL_PREFIX=/usr - make bddisasm bdshemu - cd - - name: Install rapidjson uses: actions/checkout@master with: @@ -52,6 +45,13 @@ jobs: sudo make install cd .. cd .. + - name: Build bddisasm and bdshemu + run: | + mkdir build + cd build + cmake .. -DINCLUDE_TOOL=y -DCMAKE_INSTALL_PREFIX=/usr + make bddisasm bdshemu + cd - - name: Build disasmtool_lix run: | cd build @@ -67,6 +67,12 @@ jobs: cd pybddisasm python3 setup.py build cd .. + - name: Create package + if: ${{ github.event_name == 'release' }} + run: | + cd build + make package + cd - - name: Release if: ${{ github.event_name == 'release' }} uses: AButler/upload-release-assets@v2.0 From 3e21ce944de03e4bcff1a6e9ab06605ee918d37c Mon Sep 17 00:00:00 2001 From: Anichitei Ionel-Cristinel <49393881+ianichitei@users.noreply.github.com> Date: Fri, 20 Nov 2020 16:20:18 +0200 Subject: [PATCH 07/12] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf2b428..5807fdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: run: | cd build make disasmtool + ./disasmtool -h cd - - name: Install setuptools run: | From 5c8d896b26570e1cc044ef2f0b33b87a30f1618c Mon Sep 17 00:00:00 2001 From: Anichitei Ionel-Cristinel <49393881+ianichitei@users.noreply.github.com> Date: Fri, 20 Nov 2020 16:21:55 +0200 Subject: [PATCH 08/12] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5807fdc..f166b6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: run: | cd build make disasmtool - ./disasmtool -h + ../../bin/x64/Release/disasmtool -h cd - - name: Install setuptools run: | From 974e7124f031cc2775a25aa07890b89c825d7bc1 Mon Sep 17 00:00:00 2001 From: Anichitei Ionel-Cristinel <49393881+ianichitei@users.noreply.github.com> Date: Fri, 20 Nov 2020 16:24:06 +0200 Subject: [PATCH 09/12] Update ci.yml --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f166b6f..e37ae04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,13 +50,12 @@ jobs: mkdir build cd build cmake .. -DINCLUDE_TOOL=y -DCMAKE_INSTALL_PREFIX=/usr - make bddisasm bdshemu + make bddisasm bdshemu -j$(nproc) cd - - name: Build disasmtool_lix run: | cd build - make disasmtool - ../../bin/x64/Release/disasmtool -h + make disasmtool -j$(nproc) cd - - name: Install setuptools run: | From 80a1fd54ef739465d2aec371c1f753340ebee47d Mon Sep 17 00:00:00 2001 From: Ionel-Cristinel ANICHITEI Date: Fri, 20 Nov 2020 16:24:54 +0200 Subject: [PATCH 10/12] disasmtool_lix: Use -march=nehalem when building --- disasmtool_lix/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disasmtool_lix/CMakeLists.txt b/disasmtool_lix/CMakeLists.txt index 65fd214..7597902 100644 --- a/disasmtool_lix/CMakeLists.txt +++ b/disasmtool_lix/CMakeLists.txt @@ -63,7 +63,7 @@ target_compile_options(${PROJECT_NAME} PRIVATE -g3 -gdwarf-4 -grecord-gcc-switches - -march=native + -march=nehalem -fno-omit-frame-pointer # -fsanitize=leak # -fsanitize=address From 3c6679f927007cc230e508e9494cd5ff46fbc800 Mon Sep 17 00:00:00 2001 From: Ionel-Cristinel ANICHITEI Date: Fri, 20 Nov 2020 16:32:34 +0200 Subject: [PATCH 11/12] disasmtool_lix: Remove inc/bdshemu from include directories --- disasmtool_lix/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/disasmtool_lix/CMakeLists.txt b/disasmtool_lix/CMakeLists.txt index 1e99b49..bb84296 100644 --- a/disasmtool_lix/CMakeLists.txt +++ b/disasmtool_lix/CMakeLists.txt @@ -254,7 +254,6 @@ endif() target_include_directories(${PROJECT_NAME} PRIVATE ${DISASM_DIRECTORY}/inc - ${DISASM_DIRECTORY}/inc/bdshemu ${DISASM_DIRECTORY}/bddisasm/include ) From 2806cc00cb72ef15ab0cca10ffdf1920893ac411 Mon Sep 17 00:00:00 2001 From: Anichitei Ionel-Cristinel <49393881+ianichitei@users.noreply.github.com> Date: Fri, 20 Nov 2020 16:39:54 +0200 Subject: [PATCH 12/12] ci: Build for Release on Linux --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e37ae04..f7316b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: run: | mkdir build cd build - cmake .. -DINCLUDE_TOOL=y -DCMAKE_INSTALL_PREFIX=/usr + cmake .. -DINCLUDE_TOOL=y -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release make bddisasm bdshemu -j$(nproc) cd - - name: Build disasmtool_lix