Skip to content

Commit

Permalink
ubuntu 16.04 -> 20.04 (commaai#97)
Browse files Browse the repository at this point in the history
* ubuntu 20.04

* non interactive

* fix src prefix
  • Loading branch information
adeebshihadeh authored Oct 24, 2020
1 parent b39fb46 commit 7234804
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
jobs:
build:
name: build
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
Expand All @@ -27,7 +27,7 @@ jobs:
unit_tests:
name: unit tests
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
Expand All @@ -38,7 +38,7 @@ jobs:
test_zmq:
name: zmq
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
Expand All @@ -52,7 +52,7 @@ jobs:
test_msgq:
name: msgq
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
Expand All @@ -66,7 +66,7 @@ jobs:
static_analysis:
name: static analysis
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:16.04
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
build-essential \
Expand Down
5 changes: 3 additions & 2 deletions SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ Import('env', 'arch', 'zmq', 'cython_dependencies')

import shutil

cereal_dir = Dir('.')
gen_dir = Dir('gen')
messaging_dir = Dir('messaging')

# TODO: remove src-prefix and cereal from command string. can we set working directory?
env.Command(["gen/c/include/c++.capnp.h", "gen/c/include/java.capnp.h"], [], "mkdir -p " + gen_dir.path + "/c/include && touch $TARGETS")
env.Command(['gen/cpp/car.capnp.c++', 'gen/cpp/log.capnp.c++', 'gen/cpp/car.capnp.h', 'gen/cpp/log.capnp.h'],
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c++:' + gen_dir.path + '/cpp/')
f"capnpc --src-prefix={cereal_dir.path} $SOURCES -o c++:{gen_dir.path}/cpp/")

if shutil.which('capnpc-java'):
env.Command(['gen/java/Car.java', 'gen/java/Log.java'],
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o java:' + gen_dir.path + '/java/')
f"capnpc $SOURCES --src-prefix={cereal_dir.path} -o java:{gen_dir.path}/java/")

# TODO: remove non shared cereal and messaging
cereal_objects = env.SharedObject([
Expand Down
7 changes: 3 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Export('cython_dependencies')
cereal_dir = Dir('.')

cpppath = [
cereal_dir,
'/usr/lib/include',
cereal_dir,
'/usr/lib/include',
]

AddOption('--test',
Expand Down Expand Up @@ -47,7 +47,6 @@ env = Environment(
CXXFLAGS="-std=c++1z",
CPPPATH=cpppath,
)


Export('env', 'zmq', 'arch')

SConscript(['SConscript'])

0 comments on commit 7234804

Please sign in to comment.