Skip to content

Commit

Permalink
Build against Ubuntu 18 (dafny-lang#1437)
Browse files Browse the repository at this point in the history
* Build against Ubuntu 18.04

* Escape left brace in Perl script

Co-authored-by: Remy Willems <>
  • Loading branch information
keyboardDrummer authored Sep 16, 2021
1 parent 8c9a08b commit 8a4c73c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
dotnet-version: 5.0.x # SDK Version for building Dafny; x will use the latest version of the 5.0 channel
jobs:
singletons:
runs-on: ubuntu-16.04
runs-on: ubuntu-18.04
steps:
- name: Setup dotnet 5.0
uses: actions/[email protected]
Expand Down Expand Up @@ -59,20 +59,20 @@ jobs:
## Windows jobs fail on some lit tests and sometimes fail even to
## setup a work environment (e.g. dotnet installation)
##os: [ubuntu-latest]
##os: [ubuntu-latest, windows-latest, ubuntu-16.04]
##os: [ubuntu-latest, windows-latest, ubuntu-18.04]
##os: [ubuntu-latest, macos-latest]
os: [
ubuntu-latest,
macos-latest,
## windows-latest,
ubuntu-16.04,
ubuntu-18.04,
]
## Size of the following array must match --num-shards in lit command
shard: [1, 2, 3, 4, 5]
include:
- os: 'ubuntu-latest'
os_for_build: 'ubuntu'
- os: 'ubuntu-16.04'
- os: 'ubuntu-18.04'
os_for_build: 'ubuntu'
- os: 'macos-latest'
os_for_build: 'osx'
Expand All @@ -89,12 +89,12 @@ jobs:
uses: actions/[email protected]
with:
dotnet-version: ${{env.dotnet-version}}
- name: C++ for ubuntu 16.04
if: matrix.os == 'ubuntu-16.04'
- name: C++ for ubuntu 18.04
if: matrix.os == 'ubuntu-18.04'
run: |
sudo apt-get install -y build-essential
- name: Choose the right C++ for ubuntu 16.04
if: matrix.os == 'ubuntu-16.04'
- name: Choose the right C++ for ubuntu 18.04
if: matrix.os == 'ubuntu-18.04'
run: |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 60
- uses: actions/setup-python@v1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/refman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ macos-latest ]
##os: [ macos-latest, ubuntu-16.04, ubuntu-latest ]

##os: [ macos-latest, ubuntu-18.04, ubuntu-latest ]

steps:
- name: OS
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-downloads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, ubuntu-16.04, macos-latest, windows-latest ]
os: [ ubuntu-latest, ubuntu-18.04, macos-latest, windows-latest ]
include:
- os: 'ubuntu-latest'
osn: 'ubuntu-16.04'
- os: 'ubuntu-16.04'
osn: 'ubuntu-16.04'
osn: 'ubuntu-18.04'
- os: 'ubuntu-18.04'
osn: 'ubuntu-18.04'
- os: 'macos-latest'
osn: 'osx'
- os: 'windows-latest'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/xunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-16.04
suffix: ubuntu-16.04
- os: ubuntu-18.04
suffix: ubuntu-18.04
z3: z3-4.8.5-x64-ubuntu-16.04
chmod: true
coverage: true
Expand Down
2 changes: 1 addition & 1 deletion Test/DafnyTestGeneration/TestGeneration.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Adding reflection code that allows running the tests:
// RUN: perl -pe 's/import M_Compile.*;/`cat import.txt`/ge' -i %t-tests-java/TestGenerationUnitTests_Compile/__default.java
// RUN: perl -pe 's/public class __default {/`cat reflectionCode.txt`/ge' -i %t-tests-java/TestGenerationUnitTests_Compile/__default.java
// RUN: perl -pe 's/public class __default \{/`cat reflectionCode.txt`/ge' -i %t-tests-java/TestGenerationUnitTests_Compile/__default.java

// Compiling to bytecode and running the tests
// RUN: javac -cp %t-tests-java:../../Binaries/DafnyRuntime.jar %t-tests-java/TestGenerationUnitTests_Compile/__default.java
Expand Down
4 changes: 2 additions & 2 deletions Test/lit.site.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ if os.name == "nt":
config.available_features = [ 'windows' ]
elif "Darwin" in ver:
config.available_features = [ 'macosx', 'posix' ]
elif "16.04" in ver and "Ubuntu" in ver:
config.available_features = [ 'ubuntu16', 'ubuntu', 'posix' ]
elif "18.04" in ver and "Ubuntu" in ver:
config.available_features = [ 'ubuntu18', 'ubuntu', 'posix' ]
else:
config.available_features = [ 'ubuntu', 'posix' ]

Expand Down

0 comments on commit 8a4c73c

Please sign in to comment.