Skip to content

Commit 650c23e

Browse files
authored
Merge pull request #298 from shym/ci-32bit-opam
CI 32-bit and OPAM
2 parents c2f6e18 + 0c89a67 commit 650c23e

File tree

11 files changed

+120
-12
lines changed

11 files changed

+120
-12
lines changed

.github/bin/sudo

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
# Dummy `sudo`, to skip some useless installations
44
if [ "$1" = "apt-get" -a "$2" = "install" ]; then
5-
echo "Dummy sudo: installing only 'bubblewrap' only instead of running: $@"
6-
/usr/bin/sudo apt-get install bubblewrap
5+
if [ -n "$OVERRIDE_APT_INSTALL" ]; then
6+
echo "Dummy sudo: installing only $OVERRIDE_APT_INSTALL instead of running: $@"
7+
/usr/bin/sudo apt-get install $OVERRIDE_APT_INSTALL
8+
else
9+
echo "Dummy sudo: installing only bubblewrap instead of running: $@"
10+
/usr/bin/sudo apt-get install bubblewrap
11+
fi
712
else
813
echo Dummy: sudo "$@"
914
fi

.github/workflows/common.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ on:
7171
Defaults to custom_compiler_version chunked at [+~-]
7272
type: string
7373
default: ''
74+
override_apt_install:
75+
description: |
76+
List of APT packages to install on Ubuntu runners instead of the default list used by `setup-ocaml`
77+
type: string
78+
default: 'bubblewrap'
7479

7580
jobs:
7681
build-and-test:
@@ -87,6 +92,7 @@ jobs:
8792
CUSTOM_COMPILER_VERSION: ${{ inputs.custom_compiler_version }}
8893
CUSTOM_COMPILER_SRC: ${{ inputs.custom_compiler_src }}
8994
CUSTOM_OCAML_PKG_VERSION: ${{ inputs.custom_ocaml_package_version }}
95+
OVERRIDE_APT_INSTALL: ${{ inputs.override_apt_install }}
9096

9197
# For the record, here is how to set up the environment to test
9298
# a PR-version of the compiler
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 32bit 5.0.0
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
uses: ./.github/workflows/common.yml
8+
with:
9+
compiler: 'ocaml-variants.5.0.0+options,ocaml-option-32bit'
10+
timeout: 360
11+
override_apt_install: bubblewrap gcc-multilib g++-multilib
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 32bit trunk
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
uses: ./.github/workflows/common.yml
8+
with:
9+
compiler: 'ocaml-variants.5.1.0+trunk,ocaml-option-32bit'
10+
compiler_git_ref: refs/heads/trunk
11+
timeout: 360
12+
override_apt_install: bubblewrap gcc-multilib g++-multilib

.github/workflows/opam.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: OPAM installation test
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
6+
7+
on:
8+
schedule:
9+
# Every Monday morning, at 1:11 UTC
10+
- cron: '11 1 * * 1'
11+
12+
jobs:
13+
build-and-test:
14+
env:
15+
QCHECK_MSG_INTERVAL: '60'
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Install OCaml compiler
24+
uses: ocaml/setup-ocaml@v2
25+
with:
26+
ocaml-compiler: 5.0.0
27+
opam-depext: false
28+
29+
- name: Test installation of the OPAM packages
30+
run: |
31+
opam install --with-test ./qcheck-multicoretests-util.opam ./qcheck-lin.opam ./qcheck-stm.opam
32+
33+
- name: Show configuration
34+
run: |
35+
opam exec -- ocamlc -config
36+
opam config list
37+
opam exec -- dune printenv
38+
opam list --columns=name,installed-version,repository,synopsis-or-target

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
Multicore tests
22
===============
33

4-
[![Linux 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-workflow.yml) [![MacOSX 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-500-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-500-workflow.yml) [![Linux 5.0.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-bytecode-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-bytecode-workflow.yml) [![Linux 5.0.0-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-debug-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-debug-workflow.yml) [![Windows 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-workflow.yml) [![Windows 5.0.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-bytecode-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-bytecode-workflow.yml)
5-
6-
[![Linux 5.1.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-trunk-workflow.yml) [![MacOSX 5.1.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-510-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-510-trunk-workflow.yml) [![Linux 5.1.0+trunk-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-bytecode-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-bytecode-trunk-workflow.yml) [![Linux 5.1.0+trunk-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-debug-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-debug-trunk-workflow.yml) [![Windows 5.1.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-workflow.yml) [![Windows 5.1.0+trunk-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-bytecode-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-bytecode-workflow.yml)
4+
[![Linux 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-workflow.yml)
5+
[![MacOSX 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-500-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-500-workflow.yml)
6+
[![Linux 5.0.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-bytecode-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-bytecode-workflow.yml)
7+
[![Linux 5.0.0-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-debug-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-debug-workflow.yml)
8+
[![Linux 32-bit 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-32bit-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-32bit-workflow.yml)
9+
[![Windows 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-workflow.yml)
10+
[![Windows 5.0.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-bytecode-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-500-bytecode-workflow.yml)
11+
12+
[![Linux 5.1.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-trunk-workflow.yml)
13+
[![MacOSX 5.1.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-510-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-510-trunk-workflow.yml)
14+
[![Linux 5.1.0+trunk-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-bytecode-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-bytecode-trunk-workflow.yml)
15+
[![Linux 5.1.0+trunk-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-debug-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-debug-trunk-workflow.yml)
16+
[![Linux 32-bit 5.1.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-32bit-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-510-32bit-trunk-workflow.yml)
17+
[![Windows 5.1.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-workflow.yml)
18+
[![Windows 5.1.0+trunk-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-bytecode-workflow.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/windows-510-trunk-bytecode-workflow.yml)
719

820
Experimental property-based tests of (parts of) the OCaml multicore compiler.
921

src/domain/domain_joingraph.ml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,12 @@ let test_atomic_work ~domain_bound =
157157
(*Printf.printf "main domain %i -- joining %s success\n%!" (Domain.self () :> int) tgt_id*)
158158
) ps;
159159
Atomic.get a = test_input.num_domains)
160+
161+
let bound_tak = if Sys.word_size == 64 then 100 else 8
162+
let bound_atomic = if Sys.word_size == 64 then 250 else 8
163+
160164
;;
161165
QCheck_base_runner.run_tests_main
162-
[test_tak_work ~domain_bound:100(*8*);
163-
test_atomic_work ~domain_bound:250(*8*)
166+
[test_tak_work ~domain_bound:bound_tak;
167+
test_atomic_work ~domain_bound:bound_atomic
164168
]

src/domain/domain_spawntree.ml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,11 @@ let t ~max_height ~max_degree = Test.make
8484
then true
8585
else (Printf.printf "Failure \"%s\"\n%!" s; false)
8686
))
87+
88+
let test =
89+
if Sys.word_size == 64
90+
then t ~max_height:5 ~max_degree:10
91+
else t ~max_height:3 ~max_degree:3
92+
8793
;;
88-
QCheck_base_runner.run_tests_main [t ~max_height:5 ~max_degree:10]
94+
QCheck_base_runner.run_tests_main [test]

src/thread/thread_createtree.ml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,11 @@ let t ~max_height ~max_degree = Test.make
7373
let a = Atomic.make 0 in
7474
let () = thread_interp a c in
7575
Atomic.get a = interp 0 c)
76+
77+
let test =
78+
if Sys.word_size == 64
79+
then t ~max_height:5 ~max_degree:10
80+
else t ~max_height:3 ~max_degree:3
81+
7682
;;
77-
QCheck_base_runner.run_tests_main [t ~max_height:5 ~max_degree:10]
83+
QCheck_base_runner.run_tests_main [test]

src/thread/thread_joingraph.ml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,12 @@ let test_atomic_work ~thread_bound =
116116
Thread.join p;
117117
) ps;
118118
Atomic.get a = test_input.num_threads)
119+
120+
let bound_tak = if Sys.word_size == 64 then 100 else 16
121+
let bound_atomic = if Sys.word_size == 64 then 250 else 16
122+
119123
;;
120124
QCheck_base_runner.run_tests_main
121-
[test_tak_work ~thread_bound:100(*8*);
122-
test_atomic_work ~thread_bound:250(*8*)
125+
[test_tak_work ~thread_bound:bound_tak;
126+
test_atomic_work ~thread_bound:bound_atomic
123127
]

0 commit comments

Comments
 (0)