-
Notifications
You must be signed in to change notification settings - Fork 275
[CI] Add a make + windows github action job. #5855
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
Changes from all commits
d436d86
c60fc86
211f198
fb36d81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -277,6 +277,59 @@ jobs: | |
Set-Location build | ||
ctest -V -L CORE -C Release . -j2 | ||
|
||
check-vs-2019-make-build-and-test: | ||
runs-on: windows-2019 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Fetch dependencies | ||
run: | | ||
choco install winflexbison3 strawberryperl | ||
nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0 | ||
echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH | ||
echo "c:\ProgramData\chocolatey\bin" >> $env:GITHUB_PATH | ||
echo "c:\Strawberry\" >> $env:GITHUB_PATH | ||
- name: Setup MSBuild | ||
uses: microsoft/[email protected] | ||
- name: Initialise Developer Command Line | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Prepare ccache | ||
uses: actions/cache@v2 | ||
with: | ||
path: .ccache | ||
key: ${{ runner.os }}-msbuild-make-${{ github.ref }}-${{ github.sha }}-PR | ||
restore-keys: | | ||
${{ runner.os }}-msbuild-make-${{ github.ref }} | ||
${{ runner.os }}-msbuild-make | ||
- name: ccache environment | ||
run: | | ||
echo "CLCACHE_BASEDIR=$((Get-Item -Path '.\').FullName)" >> $env:GITHUB_ENV | ||
echo "CLCACHE_DIR=$pwd\.ccache" >> $env:GITHUB_ENV | ||
- name: Download minisat with make | ||
run: make -C src minisat2-download | ||
- name: Build CBMC with make | ||
run: make CXX=clcache BUILD_ENV=MSVC -j2 -C src | ||
- name: Build unit tests with make | ||
run: make CXX=clcache BUILD_ENV=MSVC -j2 -C unit all | ||
- name: Build jbmc with make | ||
run: | | ||
make CXX=clcache -j2 -C jbmc/src setup-submodules | ||
make CXX=clcache BUILD_ENV=MSVC -j2 -C jbmc/src | ||
- name: Build JBMC unit tests | ||
run: make CXX=clcache BUILD_ENV=MSVC -j2 -C jbmc/unit all | ||
- name: Print ccache stats | ||
run: clcache -s | ||
- name: Run CBMC and JBMC unit tests | ||
run: | | ||
make CXX=clcache BUILD_ENV=MSVC -C unit test | ||
make CXX=clcache BUILD_ENV=MSVC -C jbmc/unit test | ||
- name: Run CBMC regression tests | ||
run: make CXX=clcache BUILD_ENV=MSVC -C regression test | ||
|
||
|
||
check-clang-format: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,11 +146,11 @@ ifeq ($(origin CXX),default) | |
CXX = cl | ||
endif | ||
ifeq ($(origin YACC),default) | ||
YACC = bison -y | ||
YACC = win_bison -y | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⛏️ I am guessing this is required due to the names used by the versions of flex/bison we are using in the new job. But can you add the rationale to the commit message body so A) I don't have to guess B) Anyone who starts seeing local failures due to using different versions, knows there was a reason for doing this. Not just to ruin their day ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May I suggest to simply override this variable when calling make. This way, local builds won't be broken. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's worth noting here that when someone installs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the only place that people could possibly source flex/bison for Windows from? Putting it differently, I don't recall hearing from anyone that they were unhappy with our Makefiles for Windows, which either means that no one is using them or existing users have a working set-up. So I'm with @kroening: set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are many ways to get Flex / Bison on Windows. If a user has a build environment based on Cygwin or MSYS2 for example then the packages for those environments may still be using the original names. I'd need to check to know for sure, but I don't have a Windows machine on hand. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tautschnig Are we sure we want to do that? Just for clarification, there are 3 potential configurations for building on windows (that I can see in
So, I guess my question is: Does this really break anything? Alternative build environments on Windows should not be affected in any capacity (if a user is using Cygwin or MinGW) and the MSVC one I can argue that was misconfigured (or at least stale by current standards). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have now taken another look at the rest of this file. I have now seen that there are other sets of configuration in this file for cygwin and mingw. Therefore I am less concerned about explicitly changing this for Visual Studio only. I am happy for this change to be merged as is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I simply did not know whether |
||
endif | ||
YFLAGS ?= -v | ||
ifeq ($(origin LEX),default) | ||
LEX = flex | ||
LEX = win_flex | ||
endif | ||
|
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.