Skip to content

Commit 279a3ee

Browse files
committed
Add CI build and test
1 parent 8ba3b1a commit 279a3ee

File tree

7 files changed

+75
-208
lines changed

7 files changed

+75
-208
lines changed

.github/workflows/ci.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- cheri-tests
9+
10+
# cancel in-progress job when a new push is performed
11+
concurrency:
12+
group: ci-${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
version: [4.14.1]
20+
21+
22+
runs-on: ubuntu-22.04
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: System dependencies (ubuntu)
28+
run: |
29+
sudo apt-get install opam python3 clang-15 opam libclang-15-dev llvm-15-dev
30+
31+
- name: Restore cached opam
32+
id: cache-opam-restore
33+
uses: actions/cache/restore@v4
34+
with:
35+
path: ~/.opam
36+
key: ${{ matrix.version }}
37+
38+
- name: Setup opam
39+
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
40+
run: |
41+
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
42+
opam install --with-test --deps-only --yes .
43+
44+
- name: Save cached opam
45+
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
46+
id: cache-opam-save
47+
uses: actions/cache/save@v4
48+
with:
49+
path: ~/.opam
50+
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
51+
52+
- name: Install c-tree-carver
53+
run: |
54+
opam switch ${{ matrix.version }}
55+
eval $(opam env --switch=${{ matrix.version }})
56+
opam install --yes .
57+
58+
- name: Run CI tests
59+
run: |
60+
opam switch ${{ matrix.version }}
61+
eval $(opam env --switch=${{ matrix.version }})
62+
dune runtest && cd cpp && ./test/run_test.py make && ./test/run_test.py for

.travis.yml

-97
This file was deleted.

c-tree-carver.opam

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ homepage: "https://github.com/rems-project/c-tree-carver"
1010
bug-reports: "https://github.com/rems-project/c-tree-carver/issues"
1111
depends: [
1212
"dune" {>= "3.7"}
13-
"ocaml" {>= "4.12.0"}
13+
"ocaml" {>= "4.14.1"}
1414
"conf-c++"
1515
"conf-cmake" {dev}
16-
"conf-llvm" {= "12.0.1"}
17-
"conf-python3" {with-test}
16+
"conf-llvm" {= "15.0.7"}
17+
"conf-python-3" {with-test}
1818
"fileutils" {>= "0.6.4"}
1919
"shexp" {>= "v0.15.0"}
2020
"ocamlformat" {>= "0.25.1" & dev}

conf-libclang-12-dev.opam renamed to conf-libclang-15-dev.opam

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ depends: [
1818
"conf-bash" {build}
1919
]
2020
depexts: [
21-
["libclang-12-dev"] {os-family = "debian"}
21+
["libclang-15-dev"] {os-family = "debian"}
2222
]
2323
extra-files: [[
2424
"configure.sh" "sha512=f7f3bedd554da272d3a14d631481bfed0fecce52054cd35fedf41a4493bcc7973fc28abeb305755fb546927785a6f69d1cf2d15b306da35777b471d2bc770864"
2525
]]
26-
synopsis: "Virtual package relying on libclang-12-dev library"
27-
description: "This package can only install if the libclang-12-dev library is installed on the system."
26+
synopsis: "Virtual package relying on libclang-15-dev library"
27+
description: "This package can only install if the libclang-15-dev library is installed on the system."
2828
flags: conf

conf-libclang-12-dev.opam.template renamed to conf-libclang-15-dev.opam.template

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ depends: [
1616
"conf-bash" {build}
1717
]
1818
depexts: [
19-
["libclang-12-dev"] {os-family = "debian"}
19+
["libclang-15-dev"] {os-family = "debian"}
2020
]
2121
extra-files: [[
2222
"configure.sh" "sha512=f7f3bedd554da272d3a14d631481bfed0fecce52054cd35fedf41a4493bcc7973fc28abeb305755fb546927785a6f69d1cf2d15b306da35777b471d2bc770864"
2323
]]
24-
synopsis: "Virtual package relying on libclang-12-dev library"
25-
description: "This package can only install if the libclang-12-dev library is installed on the system."
24+
synopsis: "Virtual package relying on libclang-15-dev library"
25+
description: "This package can only install if the libclang-15-dev library is installed on the system."
2626
flags: conf

dune-project

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
(synopsis "Clang-based tool for tree-carving C source trees")
2121
(description "")
2222
(depends
23-
(ocaml (>= 4.12.0))
23+
(ocaml (>= 4.14.1))
2424
conf-c++
2525
(conf-cmake :dev)
26-
(conf-llvm (= 12.0.1))
27-
(conf-python3 :with-test)
26+
(conf-llvm (= 15.0.7))
27+
(conf-python-3 :with-test)
2828
(fileutils (>= 0.6.4))
2929
(shexp (>= v0.15.0))
3030
(ocamlformat (and (>= 0.25.1) :dev))
@@ -35,7 +35,7 @@
3535
(topics c clang tool tree-carving)))
3636

3737
(package
38-
(name conf-libclang-12-dev)
38+
(name conf-libclang-15-dev)
3939
(allow_empty))
4040

4141

files/configure.sh

-98
This file was deleted.

0 commit comments

Comments
 (0)