Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 4.14.0 MSVC to CI #6917

Merged
merged 3 commits into from
Jan 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
run: opam install ./dune-configurator.opam
if: ${{ matrix.configurator == true }}

dkml:
dkml-4_12_1:
strategy:
fail-fast: false
matrix:
Expand All @@ -122,7 +122,37 @@ jobs:
abi_pattern: win32-windows_x86_64
dkml_host_abi: windows_x86_64
runs-on: ${{ matrix.gh_os }}
name: MSVC / ${{ matrix.dkml_host_abi }}
name: MSVC 4.12.1 / ${{ matrix.dkml_host_abi }}

steps:
- uses: actions/checkout@v3

- name: Setup DKML on a Windows host
if: startsWith(matrix.dkml_host_abi, 'windows_')
uses: ./ci/setup-dkml/gh-windows-4.12.1/pre

- name: Build and test the package on Windows host
if: startsWith(matrix.dkml_host_abi, 'windows_')
shell: msys2 {0}
run: ci/build-test.sh

- name: Teardown DKML on a Windows host
if: startsWith(matrix.dkml_host_abi, 'windows_')
uses: ./ci/setup-dkml/gh-windows-4.12.1/post

dkml-current:
strategy:
fail-fast: false
matrix:
include:
- gh_os: windows-2019
abi_pattern: win32-windows_x86
dkml_host_abi: windows_x86
- gh_os: windows-2019
abi_pattern: win32-windows_x86_64
dkml_host_abi: windows_x86_64
runs-on: ${{ matrix.gh_os }}
name: MSVC 4.14.0 / ${{ matrix.dkml_host_abi }}

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Unreleased
- Add a `dune cache size` command for displaying the size of the cache (#6638,
@Alizter)

- Add 4.14.0 MSVC to CI (#6917, @jonahbeckford)

3.6.2 (2022-12-21)
------------------

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ctypes \
# Dependencies recommended for developing dune locally,
# but not wanted in CI
DEV_DEPS := \
"dkml-workflows>=1.1.0" \
"dkml-workflows>=1.2.0" \
patdiff

TEST_OCAMLVERSION := 4.14.0
Expand Down
10 changes: 10 additions & 0 deletions ci/setup-dkml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ make update-dkml
```

Of course that only works if there are updates available.
And it will only do updates for the latest OCaml compiler.

### Can we test more than one OCaml compiler?

Technically no; `setup-dkml` follows the supported OCaml compiler of DKML. What
we've done in this project is rename the directories that supported the older
DKML versions (`4.12.1`). Essentially, the older DKML versions are frozen and
will no longer get updates. You may want to eventually drop the older DKML
versions by removing those directories and removing those versions from
`workflow.yml`.

### What is the version of MSVC targeted? What is the required environment to execute the `desktop-ci-*` targets in the main `Makefile`?

Expand Down
102 changes: 102 additions & 0 deletions ci/setup-dkml/gh-windows-4.12.1/post/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# setup-dkml
# Short form: sd4

# Any GitHub Job that includes this action must be in a strategy matrix.
# The matrix variables must include:
# - gh_os: windows-2019
# abi_pattern: win32-windows_x86
# dkml_host_abi: windows_x86

name: post-dkml
author: Diskuv, Inc.
description: Teardown after building OCaml native executables for Windows

runs:
using: "composite"

steps:
- name: Full matrix variables
shell: bash # bash on Windows is Git Bash (an non-upgradable MSYS2 system)
# Every matrix variable lookup in this Action should use the output of this step. Even
# the matrix variables that the user must specify (ex. dkml_host_abi) should be
# referenced using [steps.full_matrix_vars.outputs.dkml_host_abi] rather than
# [matrix.dkml_host_abi] so that there is a single place to edit for variable changes.
id: full_matrix_vars
run: |
# Select correct Windows matrix variables
case "${{ matrix.dkml_host_abi }}" in

windows_x86)
dkml_host_os='windows';
opam_root_cacheable='D:/.opam';
abi_pattern='win32-windows_x86';
gh_os='windows-2019';
gh_unix_shell='msys2 {0}';
msys2_system='MINGW32';
msys2_packages='mingw-w64-i686-pkg-config';
exe_ext='.exe';
bootstrap_opam_version='2.2.0-dkml20220801T155940Z';
opam_abi='windows_x86';
dkml_host_abi='windows_x86';
opam_root='D:/.opam';
vsstudio_hostarch='x64';
vsstudio_arch='x86';
ocaml_options='ocaml-option-32bit' ;;

windows_x86_64)
dkml_host_os='windows';
opam_root_cacheable='D:/.opam';
abi_pattern='win32-windows_x86_64';
gh_os='windows-2019';
gh_unix_shell='msys2 {0}';
msys2_system='CLANG64';
msys2_packages='mingw-w64-clang-x86_64-pkg-config';
exe_ext='.exe';
bootstrap_opam_version='2.2.0-dkml20220801T155940Z';
opam_abi='windows_x86_64';
dkml_host_abi='windows_x86_64';
opam_root='D:/.opam';
vsstudio_hostarch='x64';
vsstudio_arch='x64' ;;

*) echo "FATAL: Unsupported dkml_host_abi=$dkml_host_abi in Windows action.yml"; exit 107 ;;
esac

add() {
echo "$1=$2" | tee -a $GITHUB_OUTPUT | tee -a $GITHUB_ENV
}

add dkml_host_abi "$dkml_host_abi"
add abi_pattern "$abi_pattern"
add opam_root "$opam_root"
add opam_root_cacheable "$opam_root_cacheable"
add exe_ext "${exe_ext:-}"
add bootstrap_opam_version "${bootstrap_opam_version:-}"
add ocaml_options "${ocaml_options:-}"

- name: Teardown DKML build apparatus
shell: msys2 {0}
env:
_STUB_FOR_AUTOGEN: "ON" #

# autogen from global_env_vars.
DEFAULT_DKML_COMPILER: '4.12.1-v1.0.2'
PIN_BASE: 'v0.14.3'
PIN_BIGSTRINGAF: '0.8.0'
PIN_CORE_KERNEL: 'v0.14.2'
PIN_CTYPES_FOREIGN: '0.19.2-windowssupport-r4'
PIN_CTYPES: '0.19.2-windowssupport-r4'
PIN_CURLY: '0.2.1-windows-env_r2'
PIN_DIGESTIF: '1.0.1'
PIN_DUNE: '2.9.3+shim.1.0.2~r0'
PIN_DUNE_CONFIGURATOR: '2.9.3'
PIN_DKML_APPS: '1.0.1'
PIN_OCAMLBUILD: '0.14.0'
PIN_OCAMLFIND: '1.9.1'
PIN_OCP_INDENT: '1.8.2-windowssupport'
PIN_PPX_EXPECT: 'v0.14.1'
PIN_PTIME: '0.8.6-msvcsupport'
PIN_TIME_NOW: 'v0.14.0'
PIN_WITH_DKML: '1.0.1'
run: |
sh .ci/sd4/run-teardown-dkml.sh GITHUB_WORKSPACE "$GITHUB_WORKSPACE"
17 changes: 17 additions & 0 deletions ci/setup-dkml/gh-windows-4.12.1/post/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; DO NOT EDIT THIS FILE. It is auto-generated by generate-setup-dkml-scaffold
; Typical upgrade steps:
; opam upgrade dkml-workflows && opam exec -- generate-setup-dkml-scaffold && dune build '@gen-dkml' --auto-promote

(rule
(alias gen-dkml-4.12.1)
(target action.gen.yml)
(action
(setenv
OCAMLRUNPARAM
b
(run gh-dkml-action-yml --phase post --output-windows %{target}))))

(rule
(alias gen-dkml-4.12.1)
(action
(diff action.yml action.gen.yml)))
Loading