Skip to content

Commit 550fd06

Browse files
Create MSI installer on release
1 parent 885ce0b commit 550fd06

File tree

4 files changed

+93
-5
lines changed

4 files changed

+93
-5
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,40 @@ jobs:
170170
MERGE_BRANCH: ${{ github.ref }}
171171
run: ./.github/workflows/pull-request-check-cpplint.sh
172172

173+
# I just added this to check if my stuff is working on github actions
174+
windows-msi-package:
175+
runs-on: windows-2019
176+
env:
177+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
178+
steps:
179+
- uses: actions/checkout@v2
180+
with:
181+
submodules: recursive
182+
- name: Fetch dependencies
183+
run: |
184+
choco install winflexbison3
185+
- uses: microsoft/[email protected]
186+
- name: Configure with cmake
187+
run: |
188+
New-Item -ItemType Directory -Path build
189+
Set-Location build
190+
cmake ..
191+
- name: Build Release
192+
run: |
193+
Set-Location build
194+
cmake --build . --config Release
195+
- name: Create packages
196+
id: create_packages
197+
# We need to get the path to cpack because fascinatingly,
198+
# chocolatey also includes a command called "cpack" which takes precedence
199+
run: |
200+
Set-Location build
201+
$cpack = "$(Split-Path -Parent (Get-Command cmake).Source)\cpack.exe"
202+
& $cpack . -C Release
203+
$msi_name = (Get-ChildItem -name *.msi).Name
204+
Write-Output "::set-output name=msi_installer::build/$msi_name"
205+
Write-Output "::set-output name=msi_name::$msi_name"
206+
173207
check-string-table:
174208
runs-on: ubuntu-20.04
175209
steps:

.github/workflows/release-packages.yaml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
cd build
2525
ninja
2626
- name: Run CTest
27-
run: cd build; ctest . -V -L CORE -C Release
27+
run: cd build; ctest . -V -L CORE -C Release
2828
- name: Create packages
2929
id: create_packages
3030
run: |
@@ -56,3 +56,44 @@ jobs:
5656
brew bump-formula-pr --tag "$RELEASE_TAG" --revision "$GITHUB_SHA" cbmc
5757
env:
5858
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.DB_CI_CPROVER_ACCESS_TOKEN }}
59+
60+
windows-msi-package:
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
steps:
64+
- uses: actions/checkout@v2
65+
with:
66+
submodules: recursive
67+
- name: Fetch dependencies
68+
run: |
69+
choco install winflexbison3
70+
- uses: microsoft/[email protected]
71+
name: Setup Visual Studio environment
72+
- name: Configure with cmake
73+
run: |
74+
New-Item -ItemType Directory -Path build
75+
Set-Location build
76+
cmake ..
77+
- name: Build Release
78+
run: |
79+
Set-Location build
80+
cmake --build . --config Release
81+
- name: Create packages
82+
id: create_packages
83+
run: |
84+
Set-Location build
85+
$cpack = "$(Split-Path -Parent (Get-Command cmake).Source)\cpack.exe"
86+
& $cpack . -C Release
87+
$msi_name = (Get-ChildItem -name *.msi).Name
88+
Write-Output "::set-output name=msi_installer::build/$msi_name"
89+
Write-Output "::set-output name=msi_name::$msi_name"
90+
- name: Get release info
91+
id: get_release_info
92+
uses: bruceadams/[email protected]
93+
- name: Upload binary packages
94+
uses: actions/upload-release-asset@v1
95+
with:
96+
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
97+
asset_path: ${{ steps.create_packages.outputs.msi_installer }}
98+
asset_name: ${{ steps.create_packages.outputs.msi_name }}
99+
asset_content_type: application/x-msi

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ Get the [latest release](https://github.com/diffblue/cbmc/releases)
3030
Get the current *develop* version: `git clone https://github.com/diffblue/cbmc.git`
3131
* Develop versions are not recommended for production use.
3232

33+
Installing
34+
==========
35+
36+
### Windows
37+
38+
For windows you can install cbmc binaries via the .msi's found on the
39+
[releases](https://github.com/diffblue/cbmc/releases) page.
40+
41+
Note that we depend on the Visual C++ redistributables. You likely
42+
already have these, if not please download and run vcredist.x64.exe from
43+
[Microsoft](https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads) to install them prior to running
44+
cbmc.
45+
3346
Report bugs
3447
===========
3548

cmake/packaging.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "cbmc")
5757
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
5858
set(CPACK_GENERATOR TGZ DEB)
5959
elseif(WIN32)
60-
61-
# On windows we need to make sure to ship the
62-
# MSVC redistributable
63-
include(InstallRequiredSystemLibraries)
60+
# Note: We don't ship VC redistributables with
61+
# the windows installer; We assume these are likely
62+
# already present on a developer machine, and if not
63+
# can easily be installed separately via vcredist.exe
6464
set(CPACK_GENERATOR ZIP WIX)
6565
endif()
6666

0 commit comments

Comments
 (0)