Skip to content

Commit 1244577

Browse files
authored
Merge pull request #5855 from NlightNFotis/port-msbuild-make-job
[CI] Add a make + windows github action job.
2 parents 3c3b526 + fb36d81 commit 1244577

File tree

6 files changed

+72
-6
lines changed

6 files changed

+72
-6
lines changed

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,59 @@ jobs:
277277
Set-Location build
278278
ctest -V -L CORE -C Release . -j2
279279
280+
check-vs-2019-make-build-and-test:
281+
runs-on: windows-2019
282+
env:
283+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
284+
steps:
285+
- uses: actions/checkout@v2
286+
with:
287+
submodules: recursive
288+
- name: Fetch dependencies
289+
run: |
290+
choco install winflexbison3 strawberryperl
291+
nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
292+
echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH
293+
echo "c:\ProgramData\chocolatey\bin" >> $env:GITHUB_PATH
294+
echo "c:\Strawberry\" >> $env:GITHUB_PATH
295+
- name: Setup MSBuild
296+
uses: microsoft/[email protected]
297+
- name: Initialise Developer Command Line
298+
uses: ilammy/msvc-dev-cmd@v1
299+
- name: Prepare ccache
300+
uses: actions/cache@v2
301+
with:
302+
path: .ccache
303+
key: ${{ runner.os }}-msbuild-make-${{ github.ref }}-${{ github.sha }}-PR
304+
restore-keys: |
305+
${{ runner.os }}-msbuild-make-${{ github.ref }}
306+
${{ runner.os }}-msbuild-make
307+
- name: ccache environment
308+
run: |
309+
echo "CLCACHE_BASEDIR=$((Get-Item -Path '.\').FullName)" >> $env:GITHUB_ENV
310+
echo "CLCACHE_DIR=$pwd\.ccache" >> $env:GITHUB_ENV
311+
- name: Download minisat with make
312+
run: make -C src minisat2-download
313+
- name: Build CBMC with make
314+
run: make CXX=clcache BUILD_ENV=MSVC -j2 -C src
315+
- name: Build unit tests with make
316+
run: make CXX=clcache BUILD_ENV=MSVC -j2 -C unit all
317+
- name: Build jbmc with make
318+
run: |
319+
make CXX=clcache -j2 -C jbmc/src setup-submodules
320+
make CXX=clcache BUILD_ENV=MSVC -j2 -C jbmc/src
321+
- name: Build JBMC unit tests
322+
run: make CXX=clcache BUILD_ENV=MSVC -j2 -C jbmc/unit all
323+
- name: Print ccache stats
324+
run: clcache -s
325+
- name: Run CBMC and JBMC unit tests
326+
run: |
327+
make CXX=clcache BUILD_ENV=MSVC -C unit test
328+
make CXX=clcache BUILD_ENV=MSVC -C jbmc/unit test
329+
- name: Run CBMC regression tests
330+
run: make CXX=clcache BUILD_ENV=MSVC -C regression test
331+
332+
280333
check-clang-format:
281334
runs-on: ubuntu-20.04
282335
steps:

regression/cbmc-cpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include ../../src/config.inc
44
include ../../src/common
55

66
ifeq ($(BUILD_ENV_),MSVC)
7-
excluded_tests = -X gcc-only
7+
excluded_tests = -X gcc-only -X winbug
88
else
99
# In MacOS, a change in the assert.h header file
1010
# is causing template errors when exercising the

regression/cpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ else
1010
endif
1111

1212
ifeq ($(BUILD_ENV_),MSVC)
13-
excluded_tests = -X gcc-only
13+
excluded_tests = -X gcc-only -X winbug
1414
else
1515
# In MacOS, a change in the assert.h header file
1616
# is causing template errors when exercising the

regression/systemc/Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
ifneq ($(BUILD_ENV_),MSVC)
1+
default: tests.log
2+
3+
include ../../src/config.inc
4+
include ../../src/common
5+
6+
ifeq ($(BUILD_ENV_),MSVC)
7+
exe = ../../../src/goto-cc/goto-cl
8+
else
9+
exe = ../../../src/goto-cc/goto-cc
10+
endif
11+
12+
ifeq ($(BUILD_ENV_),MSVC)
13+
excluded_tests = -X gcc-only -X winbug
14+
else
215
# In MacOS, a change in the assert.h header file
316
# is causing template errors when exercising the
417
# C++ front end (because of a transitive include

regression/test.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ($$)
7676
my @data = grep { !/^\/\// } <FILE>;
7777
close FILE;
7878

79-
chomp @data;
79+
s/\R$// for @data;
8080
if($exit_signal_checks) {
8181
grep { /^\^EXIT=[\(\|\d]*\d+\)?\$$/ } @data or die "$fname: Missing EXIT test\n";
8282
grep { /^\^SIGNAL=\d+\$$/ } @data or die "$fname: Missing SIGNAL test\n";

src/common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ ifeq ($(origin CXX),default)
146146
CXX = cl
147147
endif
148148
ifeq ($(origin YACC),default)
149-
YACC = bison -y
149+
YACC = win_bison -y
150150
endif
151151
YFLAGS ?= -v
152152
ifeq ($(origin LEX),default)
153-
LEX = flex
153+
LEX = win_flex
154154
endif
155155

156156

0 commit comments

Comments
 (0)