Skip to content

Commit

Permalink
Use Ubuntu 20.04 in CI (#2582)
Browse files Browse the repository at this point in the history
* Fix stropts.h include file that is now removed in Ubuntu 20.04+

* Update Dockerfile to use 20.04
  • Loading branch information
ekilmer committed Aug 21, 2022
1 parent 28bbde4 commit 05884f0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
# needs to run only on pull_request
lint:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
Expand All @@ -39,7 +39,7 @@ jobs:
mypy --version
mypy
tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
type: ["ethereum_truffle", "ethereum_bench", "examples", "ethereum", "ethereum_vm", "native", "wasm", "wasm_sym", "other"]
Expand Down Expand Up @@ -118,15 +118,15 @@ jobs:
# Send notification when all tests have finished to combine coverage results
coverage-finish:
needs: tests
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
upload:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
if: github.event_name == 'schedule'
needs: tests
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
type: ["ethereum_truffle", "ethereum_bench", "examples", "ethereum", "ethereum_vm", "native", "wasm", "wasm_sym", "other"]
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
./run_tests.sh
upload:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: tests
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

LABEL name=Manticore
LABEL src="https://github.com/trailofbits/manticore"
Expand All @@ -7,7 +7,7 @@ LABEL dockerfile_maintenance=trailofbits

ENV LANG C.UTF-8

RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install python3.7 python3.7-dev python3-pip git wget
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install python3 python3-dev python3-pip git wget

# Install solc 0.4.25 and validate it
RUN wget https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-static-linux \
Expand All @@ -17,9 +17,9 @@ RUN wget https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-sta
# If this fails, the solc-static-linux binary has changed while it should not.
RUN [ "c9b268750506b88fe71371100050e9dd1e7edcf8f69da34d1cd09557ecb24580 /usr/bin/solc" = "$(sha256sum /usr/bin/solc)" ]

RUN python3.7 -m pip install -U pip
RUN python3 -m pip install -U pip

ADD . /manticore
RUN cd manticore && python3.7 -m pip install .[native]
RUN cd manticore && python3 -m pip install .[native]

CMD ["/bin/bash"]
8 changes: 7 additions & 1 deletion examples/linux/ioctl_bogus.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stropts.h>
#include <sys/ioctl.h>
#include <sys/socket.h>

// stropts not included in Ubuntu 20.04+
// #include <stropts.h>
#define FLUSHRW 0x03
#define __SID ('S' << 8)
#define I_FLUSH (__SID | 5)

int main() {
// try bogus ioctl on a non-open file descriptor
int rc = ioctl(42, I_FLUSH, FLUSHRW);
Expand Down
8 changes: 7 additions & 1 deletion examples/linux/ioctl_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stropts.h>
#include <sys/ioctl.h>
#include <sys/socket.h>

// stropts not included in Ubuntu 20.04+
// #include <stropts.h>
#define FLUSHRW 0x03
#define __SID ('S' << 8)
#define I_FLUSH (__SID | 5)

int main() {
// try bogus ioctl on a socket
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
Expand Down

0 comments on commit 05884f0

Please sign in to comment.