Skip to content

Commit f21b437

Browse files
authored
fixes the raw (non directory or zip, but file) recipes (#1562)
* fixes the raw (non directory or zip, but file) recipes * drops llvm depext (as it already should come from bap-conf-llvm) * switch from ubuntu-latest to focal * downgrades macos workers from latest to 11
1 parent 133dd23 commit f21b437

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/build-dev-repo.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ jobs:
88
strategy:
99
matrix:
1010
os:
11-
- ubuntu-latest
12-
- macos-latest
11+
- ubuntu-20.04
12+
- macos-11
1313
ocaml-compiler:
1414
- 4.11.x
1515
- 4.08.x
1616

1717
runs-on: ${{ matrix.os }}
18-
continue-on-error: ${{ matrix.os == 'macos-latest'}}
18+
continue-on-error: ${{ matrix.os == 'macos-11'}}
1919

2020
env:
2121
TMPDIR: /tmp
@@ -32,7 +32,7 @@ jobs:
3232
uses: ocaml/setup-ocaml@v2
3333
with:
3434
ocaml-compiler: ${{ matrix.ocaml-compiler }}
35-
dune-cache: ${{ matrix.os != 'macos-latest' }}
35+
dune-cache: ${{ matrix.os != 'macos-11' }}
3636

3737
- name: Add the testing Repository
3838
run: opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing
@@ -41,7 +41,7 @@ jobs:
4141
run: opam pin add bap . --no-action
4242

4343
- name: Configure Homebrew LLVM
44-
if: matrix.os == 'macos-latest'
44+
if: matrix.os == 'macos-11'
4545
run: |
4646
rm -rf /usr/local/bin/2to3
4747
rm -f $(opam var lib)/ocaml/version

lib/bap_recipe/bap_recipe.ml

+6-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ let input file parse root =
110110
let path = root.path / file in
111111
if Sys.file_exists path
112112
then parse (In_channel.read_all path)
113-
else Error (Missing_entry file)
113+
else Error (Missing_entry path)
114114

115115
let parse_recipe str =
116116
match Parsexp.Many.parse_string str with
@@ -195,8 +195,12 @@ let read t = match target_format t with
195195
let path = mkdtemp ~prefix:"recipe-" ~suffix:".unzipped" () in
196196
unzip t path;
197197
{path; temp=true; main="recipe.scm"}
198-
| Raw -> {path=Filename.dirname t; temp=false; main=t}
199198
| Dir -> {path=t; temp=false; main="recipe.scm"}
199+
| Raw -> {
200+
path=Filename.dirname t;
201+
temp=false;
202+
main=Filename.basename t
203+
}
200204

201205
let check_vars env spec loads =
202206
let specs = spec :: List.map loads ~f:(fun s -> s.spec) in

opam/opam

-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ depexts: [
305305
"libgmp-dev"
306306
"libzip-dev"
307307
"libcurl4-gnutls-dev"
308-
"llvm-9-dev"
309308
"time"
310309
"clang"
311310
"m4"

0 commit comments

Comments
 (0)