Skip to content

debug

debug #1478

Workflow file for this run

name: Builds, tests & co
on:
push:
env:
OPAMBSVERSION: 2.1.0
OPAMBSROOT: ~/.cache/.opam.cached
OPAM12CACHE: ~/.cache/opam1.2/cache
OPAM_REPO: https://github.com/ocaml/opam-repository.git
OPAM_TEST_REPO_SHA: dff745994c64d083a6ba3ddc5a9c28ed0ad0f40a
OPAM_REPO_SHA: dff745994c64d083a6ba3ddc5a9c28ed0ad0f40a
SOLVER:
CYGWIN_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
CYGWIN_ROOT: D:\cygwin
CYGWIN: winsymlinks:native
CYGWIN_EPOCH: 3
defaults:
run:
shell: bash
jobs:
####
# Caches
####
Analyse:
runs-on: ubuntu-latest
outputs:
archives: ${{ steps.keys.outputs.archives }}
ocaml-cache: ${{ steps.keys.outputs.ocaml-cache }}
cygwin: ${{ steps.keys.outputs.cygwin }}
opam-bs-cache: ${{ steps.keys.outputs.opam-bs-cache }}
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Determine cache keys
id: keys
run: |
echo archives=archives-1-${{ hashFiles('src_ext/Makefile.dune', 'src_ext/Makefile.sources', 'src_ext/Makefile', '.github/scripts/common/preamble.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/archives-cache.sh') }}-${{ env.OPAM_REPO_SHA }}
echo archives=archives-1-${{ hashFiles('src_ext/Makefile.dune', 'src_ext/Makefile.sources', 'src_ext/Makefile', '.github/scripts/common/preamble.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/archives-cache.sh') }}-${{ env.OPAM_REPO_SHA }} >> $GITHUB_OUTPUT
echo ocaml-cache=${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/create-ocaml-cache.sh') }}
echo ocaml-cache=${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/create-ocaml-cache.sh') }} >> $GITHUB_OUTPUT
echo cygwin=${{ hashFiles('.github/scripts/cygwin.cmd') }}-${{ env.CYGWIN_EPOCH }}
echo cygwin=${{ hashFiles('.github/scripts/cygwin.cmd') }}-${{ env.CYGWIN_EPOCH }} >> $GITHUB_OUTPUT
echo opam-bs-cache=${{ hashFiles('.github/scripts/main/opam-bs-cache.sh', '*.opam', '.github/scripts/main/preamble.sh') }}
echo opam-bs-cache=${{ hashFiles('.github/scripts/main/opam-bs-cache.sh', '*.opam', '.github/scripts/main/preamble.sh') }} >> $GITHUB_OUTPUT
- name: src_ext/archives and opam-repository Cache
id: archives
uses: actions/cache@v4
with:
path: |
src_ext/archives
~/opam-repository
key: ${{ steps.keys.outputs.archives }}
lookup-only: true
enableCrossOsArchive: true
- name: Create src_ext/archives and opam-repository cache
if: steps.archives.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/archives-cache.sh
Cygwin:
runs-on: windows-2019
needs: Analyse
steps:
- name: Cygwin64 Cache
id: cygwin64
uses: actions/cache@v4
with:
path: D:\Cache\cygwin\x86_64-pc-cygwin
key: cygwin64-${{ needs.Analyse.outputs.cygwin }}
lookup-only: true
enableCrossOsArchive: true
- name: Checkout tree
if: steps.cygwin64.outputs.cache-hit != 'true'
uses: actions/checkout@v4
- name: Create Cygwin64 cache
if: steps.cygwin64.outputs.cache-hit != 'true'
shell: cmd
run: .github\scripts\cygwin.cmd x86_64-pc-cygwin D:\Cache\cygwin create
Build-Windows:
runs-on: windows-2019
needs: [ Analyse, Cygwin ]
strategy:
matrix:
host: [ x86_64-pc-cygwin, i686-w64-mingw32, x86_64-w64-mingw32, i686-pc-windows, x86_64-pc-windows ]
build: [ x86_64-pc-cygwin ]
ocamlv: [ 4.14.1 ]
fail-fast: false
defaults:
run:
shell: D:\cygwin\bin\bash.exe {0}
steps:
- name: Configure LF checkout for Cygwin
if: endsWith(matrix.host, '-pc-cygwin')
shell: cmd
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- name: Checkout tree
uses: actions/checkout@v4
- name: Cygwin64 Cache
id: cygwin64
if: matrix.build == 'x86_64-pc-cygwin'
uses: actions/cache@v4
with:
path: D:\Cache\cygwin\x86_64-pc-cygwin
key: cygwin64-${{ needs.Analyse.outputs.cygwin }}
enableCrossOsArchive: true
- name: src_ext/archives and opam-repository Cache
id: archives
uses: actions/cache@v4
with:
path: |
src_ext/archives
~/opam-repository
key: ${{ needs.Analyse.outputs.archives }}
enableCrossOsArchive: true
- name: OCaml ${{ matrix.ocamlv }} Cache
id: ocaml-cache
uses: actions/cache@v4
with:
path: D:\Cache\ocaml-local.tar
key: ${{ runner.os }}-${{ matrix.host }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}
enableCrossOsArchive: true
- name: Unpack Cygwin
shell: cmd
run: .github\scripts\cygwin.cmd ${{ matrix.build }} D:\Cache\cygwin ${{ matrix.host }}
- name: Unpack OCaml ${{ matrix.ocamlv }}
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }} ${{ matrix.host }}
- name: Build
run: bash -exu .github/scripts/main/main.sh ${{ matrix.host }}
- name: Test "static" binaries on Windows
if: endsWith(matrix.host, '-pc-cygwin') == false
run: ldd ./opam.exe | test "$(grep -v -F /cygdrive/c/Windows/)" = ''
- name: Upload opam binaries for Windows
if: endsWith(matrix.host, '-pc-windows')
uses: actions/upload-artifact@v4
with:
name: opam-exe-${{ matrix.host }}-${{ matrix.ocamlv }}-${{ matrix.build }}
path: |
D:\Local\bin\opam.exe
D:\Local\bin\opam-installer.exe
D:\Local\bin\opam-putenv.exe
- name: Test (basic - Cygwin)
if: endsWith(matrix.host, '-pc-cygwin')
run: bash -exu .github/scripts/main/test.sh
- name: Test (basic - native Windows)
env:
OPAMROOT: D:\a\opam\opam\.opam
if: endsWith(matrix.host, '-pc-cygwin') == false
shell: cmd
run: |
set Path=D:\Cache\ocaml-local\bin;%Path%
if "${{ matrix.host }}" equ "x86_64-pc-windows" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if "${{ matrix.host }}" equ "i686-pc-windows" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
opam init --yes --bare -vvv --debug default git+file://D:/opam-repository#${{ env.OPAM_TEST_REPO_SHA }} --no-git-location || exit /b 1
opam switch --yes create default ocaml-system || exit /b 1
opam env || exit /b 1
opam install --yes lwt || exit /b 1
opam list || exit /b 1
opam config report || exit /b 1
- name: Test (reftests)
run: bash -exu .github/scripts/main/reftests.sh ${{ matrix.host }}