Skip to content

Commit 0cdb6fa

Browse files
committed
Bump actions versions in CI, cosmetic changes
1 parent d143ac4 commit 0cdb6fa

File tree

5 files changed

+77
-92
lines changed

5 files changed

+77
-92
lines changed

.github/workflows/mac-bundle-dylib.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/sh
22
# Bundle icu4c DLLs
33

4-
# see if icu4c has been installed
4+
# see if icu4c has been installed
55
if [ "$(brew list | grep icu4c)" = "" ]
66
then
7-
echo "installing icu4c"
7+
echo "installing icu4c"
88
brew install icu4c
99
fi
1010

@@ -14,12 +14,12 @@ dylib_dir=$(dirname "$(brew list icu4c | grep icuuc.dylib)")
1414
# find the path of "als"
1515
executable=$(find "$(stack path --local-install-root)"/bin -name "als")
1616

17-
# remove the old dylib, and make a new one
17+
# remove the old dylib, and make a new one
1818
rm -rf dylib
19-
mkdir dylib
19+
mkdir dylib
2020

2121
################################################################################
22-
# icuuc
22+
# icuuc
2323
################################################################################
2424

2525
icuuc_id=$(otool -L "$executable" | grep icuuc | awk '{print $1}')
@@ -33,7 +33,7 @@ icuuc_id_new=@loader_path/dylib/$icuuc_id_basename
3333
cp "$icuuc_path" "$icuuc_path_new"
3434

3535
# change icuuc's ID referenced by ALS
36-
install_name_tool -change "$icuuc_id" "$icuuc_id_new" "$executable"
36+
install_name_tool -change "$icuuc_id" "$icuuc_id_new" "$executable"
3737

3838
echo "icuuc referenced by ALS"
3939
echo " old ID : $icuuc_id"
@@ -42,7 +42,7 @@ echo " old path: $icuuc_path"
4242
echo " new path: $icuuc_path_new"
4343

4444
################################################################################
45-
# icui18n
45+
# icui18n
4646
################################################################################
4747

4848
icui18n_id=$(otool -L "$executable" | grep icui18n | awk '{print $1}')
@@ -56,7 +56,7 @@ icui18n_id_new=@loader_path/dylib/$icui18n_id_basename
5656
cp "$icui18n_path" "$icui18n_path_new"
5757

5858
# change icui18n's ID referenced by ALS
59-
install_name_tool -change "$icui18n_id" "$icui18n_id_new" "$executable"
59+
install_name_tool -change "$icui18n_id" "$icui18n_id_new" "$executable"
6060

6161
echo "icui18n referenced by ALS"
6262
echo " old ID : $icui18n_id"
@@ -65,7 +65,7 @@ echo " old path: $icui18n_path"
6565
echo " new path: $icui18n_path_new"
6666

6767
################################################################################
68-
# icudata
68+
# icudata
6969
################################################################################
7070

7171
# otool -L "$icui18n_id" | grep icudata | awk '{print $1}'

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ jobs:
1818
if: contains(github.ref, 'tags/v')
1919
runs-on: ubuntu-latest
2020
steps:
21+
2122
- name: 📥 Checkout repository
22-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2324

2425
- name: 🏭 Create Release
2526
id: create_release
@@ -31,9 +32,8 @@ jobs:
3132
release_name: ${{ github.ref }}
3233
draft: false
3334
prerelease: false
34-
# - name: ⏫ Upload to Hackage
35-
# id: upload_hackage
35+
# - name: ⏫ Upload to Hackage
36+
# id: upload_hackage
3637
# env:
3738
# HACKAGE_API_KEY: ${{ secrets.HACKAGE_API_KEY }}
3839
# uses: freckle/stack-upload-action@main
39-

.github/workflows/test-linux.yaml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,35 @@ jobs:
1010
steps:
1111

1212
- name: 📥 Checkout repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414

1515
# things to be cached/restored:
1616

1717
- name: 💾 Cache stack global package db
1818
id: stack-global
19-
uses: actions/cache@v2
19+
uses: actions/cache@v3
2020
with:
2121
path: ~/.stack
22-
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
22+
key: ${{ runner.os }}-stack-global-${{ hashFiles('**.yaml') }}
2323
restore-keys: |
24-
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
24+
${{ runner.os }}-stack-global
25+
2526
- name: 💾 Cache stack-installed programs in ~/.local/bin
2627
id: stack-programs
27-
uses: actions/cache@v2
28+
uses: actions/cache@v3
2829
with:
2930
path: ~/.local/bin
30-
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
31+
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
3132
restore-keys: |
32-
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
33+
${{ runner.os }}-stack-programs
34+
3335
- name: 💾 Cache .stack-work
34-
uses: actions/cache@v2
36+
uses: actions/cache@v3
3537
with:
3638
path: .stack-work
37-
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
38-
restore-keys: |
39-
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
40-
- name: 💾 Cache agda-language-server/.stack-work
41-
uses: actions/cache@v2
42-
with:
43-
path: agda-language-server/.stack-work
44-
key: ${{ runner.os }}-agda-language-server-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('agda-language-server/package.yaml') }}
39+
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
4540
restore-keys: |
46-
${{ runner.os }}-agda-language-server-stack-work-${{ matrix.plan.ghc }}
41+
${{ runner.os }}-stack-work
4742
4843
4944
# actions:
@@ -55,6 +50,7 @@ jobs:
5550
# curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
5651
if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
5752
stack --version
53+
5854
- name: ⏬ Install GHC
5955
run: |
6056
df -h
@@ -73,20 +69,20 @@ jobs:
7369
id: zip
7470
run: |
7571
# locate the data-dir
76-
datadir=$(find $(stack path --snapshot-install-root)/share -type d -name "Agda-*")
77-
78-
# locate the executable
79-
executable=$(find $(stack path --local-install-root)/bin -name "als")
72+
datadir=$(find "$(stack path --snapshot-install-root)/share" -type d -name "Agda-*")
73+
74+
# locate the executable
75+
executable=$(find "$(stack path --local-install-root)/bin" -name "als")
8076
8177
# make a temporary directory for compresssing
8278
mkdir zip
83-
cp -r $datadir zip/data
84-
cp $executable zip/
85-
79+
cp -r "$datadir" zip/data
80+
cp "$executable" zip/
81+
8682
# compress
87-
cd zip
88-
zip -r als-ubuntu.zip *
89-
cd ..
83+
cd zip
84+
zip -r als-ubuntu.zip ./*
85+
cd ..
9086
mv zip/als-ubuntu.zip .
9187
9288
@@ -98,4 +94,4 @@ jobs:
9894
draft: true
9995
prerelease: true
10096
env:
101-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-mac.yaml

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,42 @@ jobs:
1010
steps:
1111

1212
- name: 📥 Checkout repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414

1515
# things to be cached/restored:
1616

1717
- name: 💾 Cache stack global package db
1818
id: stack-global
19-
uses: actions/cache@v2
19+
uses: actions/cache@v3
2020
with:
2121
path: ~/.stack
2222
key: ${{ runner.os }}-stack-global-after20210110-${{ hashFiles('**.yaml') }}
2323
restore-keys: |
2424
${{ runner.os }}-stack-global-after202110110
25+
2526
- name: 💾 Cache stack-installed programs in ~/.local/bin
2627
id: stack-programs
27-
uses: actions/cache@v2
28+
uses: actions/cache@v3
2829
with:
2930
path: ~/.local/bin
3031
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
3132
restore-keys: |
3233
${{ runner.os }}-stack-programs
34+
3335
- name: 💾 Cache .stack-work
34-
uses: actions/cache@v2
36+
uses: actions/cache@v3
3537
with:
3638
path: .stack-work
3739
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
3840
restore-keys: |
3941
${{ runner.os }}-stack-work
4042
41-
- name: 💾 Cache agda-language-server/.stack-work
42-
uses: actions/cache@v2
43-
with:
44-
path: agda-language-server/.stack-work
45-
key: ${{ runner.os }}-agda-language-server-stack-work-${{ hashFiles('agda-language-server/package.yaml') }}
46-
restore-keys: |
47-
${{ runner.os }}-agda-language-server-stack-work
48-
4943
# actions:
5044

5145
- name: ⏬ Install stack
5246
run: |
5347
mkdir -p ~/.local/bin
54-
export PATH=~/.local/bin:$PATH
48+
export PATH=~/.local/bin:$PATH
5549
# brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
5650
if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
5751
stack --version
@@ -71,10 +65,10 @@ jobs:
7165
- name: 🔗 Bundle ICU4C DLLs
7266
run: | # Bundle icu4c DLLs
7367
74-
# see if icu4c has been installed
68+
# see if icu4c has been installed
7569
if [ "$(brew list | grep icu4c)" = "" ]
7670
then
77-
echo "installing icu4c"
71+
echo "installing icu4c"
7872
brew install icu4c
7973
fi
8074
@@ -84,12 +78,12 @@ jobs:
8478
# find the path of "als"
8579
executable=$(find "$(stack path --local-install-root)"/bin -name "als")
8680
87-
# remove the old dylib, and make a new one
81+
# remove the old dylib, and make a new one
8882
rm -rf dylib
89-
mkdir dylib
83+
mkdir dylib
9084
9185
################################################################################
92-
# icuuc
86+
# icuuc
9387
################################################################################
9488
9589
icuuc_id=$(otool -L "$executable" | grep icuuc | awk '{print $1}')
@@ -103,7 +97,7 @@ jobs:
10397
cp "$icuuc_path" "$icuuc_path_new"
10498
10599
# change icuuc's ID referenced by ALS
106-
install_name_tool -change "$icuuc_id" "$icuuc_id_new" "$executable"
100+
install_name_tool -change "$icuuc_id" "$icuuc_id_new" "$executable"
107101
108102
echo "icuuc referenced by ALS"
109103
echo " old ID : $icuuc_id"
@@ -112,7 +106,7 @@ jobs:
112106
echo " new path: $icuuc_path_new"
113107
114108
################################################################################
115-
# icui18n
109+
# icui18n
116110
################################################################################
117111
118112
icui18n_id=$(otool -L "$executable" | grep icui18n | awk '{print $1}')
@@ -126,7 +120,7 @@ jobs:
126120
cp "$icui18n_path" "$icui18n_path_new"
127121
128122
# change icui18n's ID referenced by ALS
129-
install_name_tool -change "$icui18n_id" "$icui18n_id_new" "$executable"
123+
install_name_tool -change "$icui18n_id" "$icui18n_id_new" "$executable"
130124
131125
echo "icui18n referenced by ALS"
132126
echo " old ID : $icui18n_id"
@@ -135,7 +129,7 @@ jobs:
135129
echo " new path: $icui18n_path_new"
136130
137131
################################################################################
138-
# icudata
132+
# icudata
139133
################################################################################
140134
141135
# otool -L "$icui18n_id" | grep icudata | awk '{print $1}'
@@ -160,21 +154,21 @@ jobs:
160154
id: zip
161155
run: |
162156
# locate the data-dir
163-
datadir=$(find $(stack path --snapshot-install-root)/share -type d -name "Agda-*")
164-
165-
# locate the executable
166-
executable=$(find $(stack path --local-install-root)/bin -name "als")
157+
datadir=$(find "$(stack path --snapshot-install-root)/share" -type d -name "Agda-*")
158+
159+
# locate the executable
160+
executable=$(find "$(stack path --local-install-root)/bin" -name "als")
167161
168162
# make a temporary directory for compresssing
169163
mkdir zip
170-
cp -r $datadir zip/data
164+
cp -r "$datadir" zip/data
171165
cp -r dylib zip/dylib
172-
cp $executable zip/
173-
166+
cp "$executable" zip/
167+
174168
# compress
175-
cd zip
176-
zip -r als-macos.zip *
177-
cd ..
169+
cd zip
170+
zip -r als-macos.zip ./*
171+
cd ..
178172
mv zip/als-macos.zip .
179173
180174
- name: 🚢 Release Artifacts
@@ -185,4 +179,4 @@ jobs:
185179
draft: true
186180
prerelease: true
187181
env:
188-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
182+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)