Skip to content

Commit 79b7cf1

Browse files
committed
ci: revert back to deps.exe for clojure on Windows
I gave the Clojure official Windows installation as installed by the clojure-setup GitHub action a try. And, in my opinion, it was much more trouble than it was worth. Having to run clojure from PowerShell was problematic.
1 parent 3b02ae6 commit 79b7cf1

File tree

2 files changed

+53
-35
lines changed

2 files changed

+53
-35
lines changed

.github/workflows/native-image-test.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,16 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ${{ matrix.sys.os }}-latest
7+
runs-on: ${{ matrix.os }}-latest
88
strategy:
99
fail-fast: false
1010
matrix:
11-
sys:
12-
# override the default of pwsh for windows
13-
- { os: windows, shell: powershell }
14-
- { os: ubuntu, shell: bash }
15-
- { os: macos, shell: bash }
11+
os: [ windows, ubuntu, macos ]
1612
graal-java: [ 11 ]
1713
test: [ test-native, test-native-sci ]
1814
clojure-version: [ '1.11' ]
1915

20-
defaults:
21-
run:
22-
shell: ${{ matrix.sys.shell }}
23-
24-
name: ${{ matrix.sys.os }},jdk ${{ matrix.graal-java }},${{ matrix.test }},clj ${{ matrix.clojure-version }}
16+
name: ${{ matrix.os }},jdk ${{ matrix.graal-java }},${{ matrix.test }},clj ${{ matrix.clojure-version }}
2517

2618
steps:
2719
- uses: actions/checkout@v3
@@ -50,15 +42,32 @@ jobs:
5042
github-token: ${{ secrets.GITHUB_TOKEN }}
5143

5244
#
53-
# Install Clojure, Babashka
45+
# Install Babashka
5446
#
55-
- name: Install Clojure tools
47+
- name: Install Babashka
5648
uses: DeLaGuardo/[email protected]
5749
with:
58-
cli: 1.11.1.1105
5950
bb: 'latest'
6051
github-token: ${{ secrets.GITHUB_TOKEN }}
6152

53+
#
54+
# Install Clojure
55+
#
56+
- name: Install clojure (windows)
57+
# On windows, deps.clj's deps.exe is used in place of clojure to avoid complexities of official clojure install
58+
run: |
59+
PowerShell -Command "iwr -useb https://raw.githubusercontent.com/borkdude/deps.clj/master/install.ps1 | iex"
60+
Rename-Item $HOME\deps.clj\deps.exe clojure.exe
61+
echo "$HOME\deps.clj" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
62+
if: matrix.os == 'windows'
63+
64+
- name: Install Clojure (macos, linux)
65+
uses: DeLaGuardo/[email protected]
66+
with:
67+
cli: 1.11.1.1105
68+
github-token: ${{ secrets.GITHUB_TOKEN }}
69+
if: matrix.os != 'windows'
70+
6271
#
6372
# Summarize installs
6473
#

.github/workflows/unit-test.yml

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,22 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ${{ matrix.sys.os }}-latest
7+
runs-on: ${{ matrix.os }}-latest
88
strategy:
99
fail-fast: false
1010
matrix:
11-
sys:
12-
# override the default of pwsh for windows
13-
- { os: windows, shell: powershell }
14-
- { os: ubuntu, shell: bash }
15-
- { os: macos, shell: bash }
11+
os: [ windows, ubuntu, macos ]
1612
java: [ '8', '11', '17' ]
1713

18-
defaults:
19-
run:
20-
shell: ${{ matrix.sys.shell }}
21-
22-
name: ${{ matrix.sys.os }},jdk ${{ matrix.java }}
14+
name: ${{ matrix.os }},jdk ${{ matrix.java }}
2315

2416
steps:
2517
#
2618
# Tell git not to convert newlines on checkout for Windows
2719
#
2820
- name: Prepare git (Windows)
2921
run: git config --global core.autocrlf false
30-
if: matrix.sys.os == 'windows'
22+
if: matrix.os == 'windows'
3123

3224
- uses: actions/checkout@v3
3325

@@ -64,27 +56,44 @@ jobs:
6456
#
6557
- name: Install planck (macOS)
6658
run: brew install planck
67-
if: matrix.sys.os == 'macos'
59+
if: matrix.os == 'macos'
6860
- name: Install planck (linux)
6961
run: |
7062
sudo add-apt-repository -y ppa:mfikes/planck
7163
sudo apt-get update
7264
sudo apt-get install -y planck
73-
if: matrix.sys.os == 'ubuntu'
65+
if: matrix.os == 'ubuntu'
7466
- name: Install planck (macOS)
7567
run: brew install planck
76-
if: matrix.sys.os == 'macos'
68+
if: matrix.os == 'macos'
7769

7870
#
79-
# Install Clojure & Babashka
71+
# Install Babashka
8072
#
81-
- name: Install Clojure tools
73+
- name: Install Babashka
8274
uses: DeLaGuardo/[email protected]
8375
with:
84-
cli: 1.11.1.1105
8576
bb: 'latest'
8677
github-token: ${{ secrets.GITHUB_TOKEN }}
8778

79+
#
80+
# Install Clojure
81+
#
82+
- name: Install clojure (windows)
83+
# On windows, deps.clj's deps.exe is used in place of clojure to avoid complexities of official clojure install
84+
run: |
85+
PowerShell -Command "iwr -useb https://raw.githubusercontent.com/borkdude/deps.clj/master/install.ps1 | iex"
86+
Rename-Item $HOME\deps.clj\deps.exe clojure.exe
87+
echo "$HOME\deps.clj" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
88+
if: matrix.os == 'windows'
89+
90+
- name: Install Clojure (macos, linux)
91+
uses: DeLaGuardo/[email protected]
92+
with:
93+
cli: 1.11.1.1105
94+
github-token: ${{ secrets.GITHUB_TOKEN }}
95+
if: matrix.os != 'windows'
96+
8897
#
8998
# Summarize installs
9099
#
@@ -102,17 +111,17 @@ jobs:
102111
run: |
103112
echo "planck --version"
104113
planck --version
105-
if: matrix.sys.os != 'windows'
114+
if: matrix.os != 'windows'
106115

107116
#
108117
# Node modules
109118
#
110119
- name: Install karma command line (windows)
111120
run: npm install karma-cli -g
112-
if: matrix.sys.os == 'windows'
121+
if: matrix.os == 'windows'
113122
- name: Install karma command line (macos, linux)
114123
run: sudo npm install karma-cli -g
115-
if: matrix.sys.os != 'windows'
124+
if: matrix.os != 'windows'
116125

117126
- name: Install node modules
118127
run: npm install

0 commit comments

Comments
 (0)