Skip to content

Commit

Permalink
Add MSVC 4.14.0 CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jonah Beckford <71855677+jonahbeckford@users.noreply.github.com>
  • Loading branch information
jonahbeckford committed Jan 23, 2023
1 parent 81ec139 commit 35c9ba3
Show file tree
Hide file tree
Showing 9 changed files with 2,430 additions and 105 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ jobs:
dkml_host_abi: windows_x86_64
version: 4.12.1
version_suffix: -4.12.1
- gh_os: windows-2019
abi_pattern: win32-windows_x86
dkml_host_abi: windows_x86
version: 4.14.0
version_suffix: ''
- gh_os: windows-2019
abi_pattern: win32-windows_x86_64
dkml_host_abi: windows_x86_64
version: 4.14.0
version_suffix: ''
runs-on: ${{ matrix.gh_os }}
name: MSVC ${{ matrix.version }} / ${{ matrix.dkml_host_abi }}

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
107 changes: 107 additions & 0 deletions ci/setup-dkml/gh-windows/post/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# 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-alpha-20221104';
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-alpha-20221104';
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.14.0-v1.1.0-prerel15'
PIN_ALCOTEST: '1.6.0'
PIN_ALCOTEST_ASYNC: '1.6.0'
PIN_ALCOTEST_JS: '1.6.0'
PIN_ALCOTEST_LWT: '1.6.0'
PIN_ALCOTEST_MIRAGE: '1.6.0'
PIN_BASE: 'v0.15.1'
PIN_BASE_BIGSTRING: 'v0.15.0'
PIN_BIGSTRINGAF: '0.9.0+msvc'
PIN_CORE: 'v0.15.1'
PIN_CORE_KERNEL: 'v0.15.0'
PIN_CTYPES_FOREIGN: '0.19.2-windowssupport-r5'
PIN_CTYPES: '0.19.2-windowssupport-r5'
PIN_CURLY: '0.2.1-windows-env_r2'
PIN_DKML_APPS: '1.2.0~prerel8'
PIN_DKML_EXE: '1.2.0~prerel8'
PIN_DUNE: '3.6.2'
PIN_FEATHER: '0.3.0'
PIN_OCAMLBUILD: '0.14.0'
PIN_OCAMLFIND: '1.9.1'
PIN_OCP_INDENT: '1.8.2-windowssupport'
PIN_PPX_EXPECT: 'v0.15.1'
PIN_WITH_DKML: '1.2.0~prerel8'
run: |
sh .ci/sd4/run-teardown-dkml.sh GITHUB_WORKSPACE "$GITHUB_WORKSPACE"
17 changes: 17 additions & 0 deletions ci/setup-dkml/gh-windows/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)
(target action.gen.yml)
(action
(setenv
OCAMLRUNPARAM
b
(run gh-dkml-action-yml --phase post --output-windows %{target}))))

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

0 comments on commit 35c9ba3

Please sign in to comment.