Skip to content

Commit 2540853

Browse files
authored
Fine-tune GitHub Actions workflows (#1312)
* Use semver-style version matching on CI workflow Signed-off-by: Sora Morimoto <[email protected]> * Update docker/build-push-action to v2 Signed-off-by: Sora Morimoto <[email protected]> * Format GitHub workflow files Signed-off-by: Sora Morimoto <[email protected]> * Enable dune cache on the Ubuntu runners Signed-off-by: Sora Morimoto <[email protected]>
1 parent ed14f3a commit 2540853

13 files changed

+319
-306
lines changed

.github/workflows/alpine.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ name: Alpine
22

33
on:
44
schedule:
5-
- cron: '0 0 * * MON'
5+
- cron: "0 0 * * MON"
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@master
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
1213

13-
- name: Build on Alpine
14-
uses: docker/build-push-action@v1
15-
with:
16-
push: false
17-
dockerfile: docker/alpine/Dockerfile
14+
- name: Build on Alpine
15+
uses: docker/build-push-action@v2
16+
with:
17+
push: false
18+
file: docker/alpine/Dockerfile

.github/workflows/archlinux.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ name: Archlinux
22

33
on:
44
schedule:
5-
- cron: '0 0 * * TUE'
5+
- cron: "0 0 * * TUE"
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@master
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
1213

13-
- name: Build on Archlinux
14-
uses: docker/build-push-action@v1
15-
with:
16-
push: false
17-
dockerfile: docker/archlinux/Dockerfile
14+
- name: Build on Archlinux
15+
uses: docker/build-push-action@v2
16+
with:
17+
push: false
18+
file: docker/archlinux/Dockerfile

.github/workflows/build-and-test.yml

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -6,74 +6,74 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-latest
10-
11-
env:
12-
OPAMJOBS: 2
13-
OPAMRETRES: 8
14-
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v2
18-
19-
- name: Install OCaml
20-
uses: ocaml/setup-ocaml@v2
21-
with:
22-
ocaml-compiler: 4.08.1
23-
24-
- name: Add the testing Repository
25-
run: opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
26-
27-
28-
- name: Pin OASIS
29-
run: opam pin add oasis https://github.com/BinaryAnalysisPlatform/oasis.git
30-
31-
- name: Pin BAP
32-
run: opam pin add bap . --no-action
33-
34-
- name: Install system dependencies
35-
run: opam depext -u bap
36-
37-
- name: Install opam dependencies
38-
run: |
39-
opam install bap --deps-only
40-
opam install omake
41-
42-
- name: Configure BAP
43-
run: |
44-
opam exec -- ./configure-omake \
45-
--enable-tests \
46-
--with-llvm-version=9 \
47-
--with-llvm-config=llvm-config-9
48-
49-
- name: Build BAP
50-
run: opam exec -- make
51-
52-
- name: Install BAP
53-
run: opam exec -- make reinstall
54-
55-
- name: Run Unit Tests
56-
run: opam exec -- make test
57-
58-
- name: Run Functional Tests
59-
run: opam exec -- make check
60-
61-
- uses: actions/upload-artifact@v2
62-
if: ${{ always() }}
63-
with:
64-
name: bap-log
65-
path: ~/.local/state/bap
66-
67-
- uses: actions/upload-artifact@v2
68-
if: ${{ always() }}
69-
with:
70-
name: unit-tests-log
71-
path: _build/oUnit-*.log
72-
73-
- uses: actions/upload-artifact@v2
74-
if: ${{ always() }}
75-
with:
76-
name: fun-tests-log
77-
path: |
78-
testsuite/*.log
79-
testsuite/logs
9+
runs-on: ubuntu-latest
10+
11+
env:
12+
OPAMJOBS: 2
13+
OPAMRETRES: 8
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Install OCaml
20+
uses: ocaml/setup-ocaml@v2
21+
with:
22+
ocaml-compiler: 4.08.x
23+
dune-cache: true
24+
25+
- name: Add the testing Repository
26+
run: opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
27+
28+
- name: Pin OASIS
29+
run: opam pin add oasis https://github.com/BinaryAnalysisPlatform/oasis.git
30+
31+
- name: Pin BAP
32+
run: opam pin add bap . --no-action
33+
34+
- name: Install system dependencies
35+
run: opam depext -u bap
36+
37+
- name: Install opam dependencies
38+
run: |
39+
opam install bap --deps-only
40+
opam install omake
41+
42+
- name: Configure BAP
43+
run: |
44+
opam exec -- ./configure-omake \
45+
--enable-tests \
46+
--with-llvm-version=9 \
47+
--with-llvm-config=llvm-config-9
48+
49+
- name: Build BAP
50+
run: opam exec -- make
51+
52+
- name: Install BAP
53+
run: opam exec -- make reinstall
54+
55+
- name: Run Unit Tests
56+
run: opam exec -- make test
57+
58+
- name: Run Functional Tests
59+
run: opam exec -- make check
60+
61+
- uses: actions/upload-artifact@v2
62+
if: ${{ always() }}
63+
with:
64+
name: bap-log
65+
path: ~/.local/state/bap
66+
67+
- uses: actions/upload-artifact@v2
68+
if: ${{ always() }}
69+
with:
70+
name: unit-tests-log
71+
path: _build/oUnit-*.log
72+
73+
- uses: actions/upload-artifact@v2
74+
if: ${{ always() }}
75+
with:
76+
name: fun-tests-log
77+
path: |
78+
testsuite/*.log
79+
testsuite/logs

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
build:
88
strategy:
99
matrix:
10-
os:
11-
- ubuntu-latest
12-
- macos-latest
13-
ocaml-version:
14-
- 4.11.1
15-
- 4.08.1
10+
os:
11+
- ubuntu-latest
12+
- macos-latest
13+
ocaml-compiler:
14+
- 4.11.x
15+
- 4.08.x
1616

1717
runs-on: ${{ matrix.os }}
1818

@@ -27,10 +27,11 @@ jobs:
2727
- name: Checkout code
2828
uses: actions/checkout@v2
2929

30-
- name: Use OCaml ${{ matrix.ocaml-version }}
30+
- name: Use OCaml ${{ matrix.ocaml-compiler }}
3131
uses: ocaml/setup-ocaml@v2
3232
with:
33-
ocaml-compiler: ${{ matrix.ocaml-version }}
33+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
34+
dune-cache: ${{ matrix.os != 'macos-latest' }}
3435

3536
- name: Add the testing Repository
3637
run: opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
@@ -60,5 +61,5 @@ jobs:
6061
- uses: actions/upload-artifact@v2
6162
if: ${{ always() }}
6263
with:
63-
name: opam-log-${{ matrix.os }}-${{ matrix.ocaml-version }}
64+
name: opam-log-${{ matrix.os }}-${{ matrix.ocaml-compiler }}
6465
path: ~/.opam/log

.github/workflows/build-from-opam.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
build:
77
strategy:
88
matrix:
9-
ocaml-version:
10-
- 4.11.1
11-
- 4.08.1
9+
ocaml-compiler:
10+
- 4.11.x
11+
- 4.08.x
1212

1313
runs-on: ubuntu-latest
1414

@@ -17,28 +17,29 @@ jobs:
1717
OPAMRETRES: 8
1818

1919
steps:
20-
- name: Use OCaml ${{ matrix.ocaml-version }}
21-
uses: ocaml/setup-ocaml@v2
22-
with:
23-
ocaml-compiler: ${{ matrix.ocaml-version }}
20+
- name: Use OCaml ${{ matrix.ocaml-compiler }}
21+
uses: ocaml/setup-ocaml@v2
22+
with:
23+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
24+
dune-cache: true
2425

25-
- name: Add the testing Repository
26-
run: opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
26+
- name: Add the testing Repository
27+
run: opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
2728

28-
- name: Install system dependencies
29-
run: opam depext -u bap
29+
- name: Install system dependencies
30+
run: opam depext -u bap
3031

31-
- name: Cleanup the Caches
32-
run: sudo apt clean --yes
32+
- name: Cleanup the Caches
33+
run: sudo apt clean --yes
3334

34-
- name: Check the Space
35-
run: df -h
35+
- name: Check the Space
36+
run: df -h
3637

37-
- name: Build and Install BAP Packages
38-
run: opam clean -a; opam install bap
38+
- name: Build and Install BAP Packages
39+
run: opam clean -a; opam install bap
3940

40-
- uses: actions/upload-artifact@v2
41-
if: ${{ always() }}
42-
with:
43-
name: opam-log-${{ matrix.ocaml-version }}
44-
path: ~/.opam/log
41+
- uses: actions/upload-artifact@v2
42+
if: ${{ always() }}
43+
with:
44+
name: opam-log-${{ matrix.ocaml-compiler }}
45+
path: ~/.opam/log

.github/workflows/check-the-style.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
- name: Setup OCaml
1919
uses: ocaml/setup-ocaml@v2
2020
with:
21-
ocaml-compile: 4.08.1
21+
ocaml-compiler: 4.08.x
22+
dune-cache: true
2223

2324
- name: Check the Style
2425
run: opam install -y ocp-indent && opam exec -- make check-style

.github/workflows/debian-testing.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ name: Debian-testing
22

33
on:
44
schedule:
5-
- cron: '0 0 * * WED'
5+
- cron: "0 0 * * WED"
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@master
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
1213

13-
- name: Build on Debian Testing
14-
uses: docker/build-push-action@v1
15-
with:
16-
push: false
17-
dockerfile: docker/debian/testing/Dockerfile
14+
- name: Build on Debian Testing
15+
uses: docker/build-push-action@v2
16+
with:
17+
push: false
18+
file: docker/debian/testing/Dockerfile

.github/workflows/fedora.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ name: Fedora
22

33
on:
44
schedule:
5-
- cron: '0 0 * * THU'
5+
- cron: "0 0 * * THU"
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@master
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
1213

13-
- name: Build on Fedora
14-
uses: docker/build-push-action@v1
15-
with:
16-
push: false
17-
dockerfile: docker/fedora/Dockerfile
14+
- name: Build on Fedora
15+
uses: docker/build-push-action@v2
16+
with:
17+
push: false
18+
file: docker/fedora/Dockerfile

0 commit comments

Comments
 (0)