Skip to content

Commit

Permalink
Add GitHub Actions build for Linux + Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeac committed Dec 21, 2020
1 parent 1944b80 commit 6698e67
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 1 deletion.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI
on: [push, pull_request]


jobs:
#linux-gcc:
#name: Linux GCC 9
#runs-on: ubuntu-20.04
#steps:
#- name: Checkout
#uses: actions/checkout@v2
#- name: Get Dependencies
#shell: bash
#run: sudo apt-get -y update && sudo apt-get install -y --no-install-recommends build-essential cmake qt5-default libcapstone-dev flex bison
#- name: Configure
#run: |
#mkdir build
#cd build
#CC=gcc-9 CXX=g++-9 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBOOMERANG_BUILD_UNIT_TESTS=ON -DBOOMERANG_BUILD_REGRESSION_TESTS=ON ..
#- name: Build
#run: |
#cd build
#make -j$(nproc) all
#- name: Run Unit Tests
#run: |
#cd build
#make test
#- name: Run Regression Tests
#run: |
#cd build
#make check

#linux-clang:
#name: Linux Clang 10
#runs-on: ubuntu-20.04
#steps:
#- name: Checkout
#uses: actions/checkout@v2
#- name: Get Dependencies
#shell: bash
#run: sudo apt-get -y update && sudo apt-get install -y --no-install-recommends build-essential clang cmake qt5-default libcapstone-dev flex bison
#- name: Configure
#run: |
#mkdir build
#cd build
#CC=clang-10 CXX=clang++-10 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBOOMERANG_BUILD_UNIT_TESTS=ON -DBOOMERANG_BUILD_REGRESSION_TESTS=ON ..
#- name: Build
#run: |
#cd build
#make -j$(nproc) all
#- name: Run Unit Tests
#run: |
#cd build
#make test
#- name: Run Regression Tests
#run: |
#cd build
#make check

windows-msvc:
name: Windows MSVC
runs-on: windows-2019
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v2
- name: Install Capstone
uses: lukka/run-vcpkg@v4.1
with:
vcpkgDirectory: '${{ github.workspace }}/../vcpkg/'
vcpkgArguments: '--disable-metrics capstone[core,x86,ppc]'
vcpkgGitCommitId: 6185aa76504a5025f36754324abf307cc776f3da
vcpkgTriplet: x64-windows
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Checkout
uses: actions/checkout@v2
- name: Make build directory
run: mkdir build
- name: Install winflexbison
shell: powershell
run: |
cd build
${{github.workspace}}\scripts\install-winflexbison.ps1
- name: Configure
run: cd build && cmake -A x64 -DCMAKE_TOOLCHAIN_FILE="${{github.workspace}}/../vcpkg/scripts/buildsystems/vcpkg.cmake" -DBISON_EXECUTABLE="${{github.workspace}}/build/winflexbison/win_bison.exe" -DFLEX_EXECUTABLE="${{github.workspace}}/build/winflexbison/win_flex.exe" ..
- name: Build
run: |
cd build
msbuild.exe boomerang.sln /t:boomerang-cli /p:Configuration=Release
21 changes: 21 additions & 0 deletions scripts/install-winflexbison.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# Install flex + bison via winflexbison
if (!(Test-Path winflexbison.zip)) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
if (Invoke-WebRequest -Uri https://github.com/lexxmark/winflexbison/releases/download/v2.5.18/win_flex_bison-2.5.18.zip -OutFile winflexbison.zip) {
Write-Output "Could not download winflexbison"
exit 1
}
}

$expectedhash = "095CF65CB3F12EE5888022F93109ACBE6264E5F18F6FFCE0BDA77FEB31B65BD8"
$actualhash = (Get-FileHash -Algorithm "SHA256" winflexbison.zip).hash

if ($actualhash -ne $expectedhash) {
Write-Output "File hash does not match: Expected: $expectedhash, Actual: $actualhash"
exit 1
}

if (!(Test-Path winflexbison)) {
Expand-Archive -LiteralPath winflexbison.zip -DestinationPath winflexbison
}
3 changes: 2 additions & 1 deletion tests/regression-tests/regression-tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
"ppc/uns",

"ppc/o4/banner",
"ppc/o4/branch",
"ppc/o4/condcodexform",
"ppc/o4/daysofxmas",
"ppc/o4/fbranch",
Expand Down Expand Up @@ -262,6 +261,8 @@
"dos/STRLEN.EXE",
"dos/TESTLONG.EXE",

"ppc/o4/branch",

"windows/fbranch.exe",
"windows/hello_release.exe",
"windows/switch_borland.exe",
Expand Down

0 comments on commit 6698e67

Please sign in to comment.