Skip to content

Commit

Permalink
ci: Conditionally enable Apple Silicon (2/n)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonah Beckford committed Nov 26, 2023
1 parent 03c4246 commit 9caa72d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/dkml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,39 +92,39 @@ jobs:

steps:
- name: Checkout code
if: matrix.enabled == 'true'
if: matrix.enabled
uses: actions/checkout@v3

- name: Cache DkML compilers code
if: matrix.enabled == 'true'
if: matrix.enabled
uses: actions/cache@v3
id: cache-dkml-compilers
with:
path: .ci/dkml-compilers
key: ${{ runner.os }}

- name: Checkout DkML compilers code
if: steps.cache-dkml-compilers.outputs.cache-hit != 'true' && matrix.enabled == 'true'
if: steps.cache-dkml-compilers.outputs.cache-hit != 'true' && matrix.enabled
# For help: ./dk dkml.workflow.compilers HELP
run: ./dk dkml.workflow.compilers PRERELEASE CI GitHub

# The .ci/dkml-compilers "pre" actions will create the environment variables:
# opam_root, exe_ext, dkml_host_abi, abi_pattern (and many more)
#
- name: Setup DkML compilers on a Windows host
if: startsWith(matrix.dkml_host_abi, 'windows_') && matrix.enabled == 'true'
if: startsWith(matrix.dkml_host_abi, 'windows_') && matrix.enabled
uses: ./.ci/dkml-compilers/gh-windows/pre
with:
DKML_COMPILER: ${{ env.DKML_COMPILER }}
CACHE_PREFIX: ${{ env.CACHE_PREFIX }}
- name: Setup DkML compilers on a Linux host
if: startsWith(matrix.dkml_host_abi, 'linux_') && matrix.enabled == 'true'
if: startsWith(matrix.dkml_host_abi, 'linux_') && matrix.enabled
uses: ./.ci/dkml-compilers/gh-linux/pre
with:
DKML_COMPILER: ${{ env.DKML_COMPILER }}
CACHE_PREFIX: ${{ env.CACHE_PREFIX }}
- name: Setup DkML compilers on a Darwin host
if: startsWith(matrix.dkml_host_abi, 'darwin_') && matrix.enabled == 'true'
if: startsWith(matrix.dkml_host_abi, 'darwin_') && matrix.enabled
uses: ./.ci/dkml-compilers/gh-darwin/pre
with:
DKML_COMPILER: ${{ env.DKML_COMPILER }}
Expand All @@ -134,13 +134,13 @@ jobs:
# ci/build-test.sh or a similar file

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

- name: Build and test on non-Windows host
if: |
!startsWith(matrix.dkml_host_abi, 'windows_') && matrix.enabled == 'true'
!startsWith(matrix.dkml_host_abi, 'windows_') && matrix.enabled
run: sh ci/build-test.sh

# Capture the dist/ folder for the release job
Expand All @@ -152,15 +152,15 @@ jobs:
# The .ci/dkml-compilers "post" actions will finalize caching, etc.

- name: Teardown DkML compilers on a Windows host
if: startsWith(matrix.dkml_host_abi, 'windows_') && matrix.enabled == 'true'
if: startsWith(matrix.dkml_host_abi, 'windows_') && matrix.enabled
uses: ./.ci/dkml-compilers/gh-windows/post

- name: Teardown DkML compilers on a Darwin host
if: startsWith(matrix.dkml_host_abi, 'darwin_') && matrix.enabled == 'true'
if: startsWith(matrix.dkml_host_abi, 'darwin_') && matrix.enabled
uses: ./.ci/dkml-compilers/gh-darwin/post

- name: Teardown DkML compilers on a Linux host
if: startsWith(matrix.dkml_host_abi, 'linux_') && matrix.enabled == 'true'
if: startsWith(matrix.dkml_host_abi, 'linux_') && matrix.enabled
uses: ./.ci/dkml-compilers/gh-linux/post

#--------
Expand Down

0 comments on commit 9caa72d

Please sign in to comment.