Repository navigation
77 lines (69 loc) · 2.8 KB
/
Copy pathdevsetup.yml
File metadata and controls
77 lines (69 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# GitHub Actions workflow to set up and build Infer in different development environments
name: devsetup
on:
- pull_request
jobs:
devsetup-build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-26
- macos-26-intel
- windows-2025
ocaml-compiler:
- ocaml-variants.5.4.1+options
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
# The build needs bash and GNU make. On Windows, setup-ocaml puts the bin directory of
# opam's internal Cygwin first on the PATH, so this is Cygwin's bash.
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install automake coreutils zlib
- name: Setup Java SDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
# Both inputs are ignored on non-Windows runners.
windows-compiler: mingw
windows-environment: cygwin
- name: Install Windows dependencies
if: runner.os == 'Windows'
# autogen.sh needs autoconf and automake, which opam's internal Cygwin does not include. The
# other packages are the system dependencies of infer's opam dependencies (gmp, sqlite3,
# zlib, pkg-config), which opam would otherwise install itself, from a Cygwin shell.
# Cygwin's installer runs from PowerShell so that no Cygwin process is running meanwhile.
shell: pwsh
run: |
$cygwin = Join-Path $env:OPAMROOT .cygwin
$setup = Join-Path $cygwin setup-x86_64.exe
if (-not (Test-Path $setup)) {
Invoke-WebRequest https://cygwin.com/setup-x86_64.exe -OutFile $setup
}
$packages = @(
'autoconf', 'automake', 'make', 'pkgconf', 'mingw64-x86_64-gmp', 'mingw64-i686-gmp',
'mingw64-x86_64-sqlite3', 'mingw64-x86_64-zlib'
) -join ','
& $setup --quiet-mode --no-shortcuts --no-admin --root (Join-Path $cygwin root) `
--local-package-dir (Join-Path $cygwin cache) `
--site https://mirrors.kernel.org/sourceware/cygwin/ --packages $packages |
Out-Default
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- run: ./build-infer.sh --yes --user-opam-switch java
- run: make devsetup
- run: scripts/check_opam_lock.sh opam/infer.opam.locked opam/ocamlformat.opam.locked
- run: make -C infer/src clean
- run: make -j -C infer/src byte
- run: make -j direct_sil_pulse_test
- run: make -j direct_java_pulse_test