Skip to content

Commit af0d070

Browse files
committed
Merge remote-tracking branch 'origin/master' into separate_call_callbacks
2 parents d116ff4 + d2ca770 commit af0d070

1 file changed

Lines changed: 59 additions & 17 deletions

File tree

.github/workflows/main.yml

Lines changed: 59 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8+
workflow_dispatch:
89

910
jobs:
1011
build:
@@ -13,28 +14,69 @@ jobs:
1314
matrix:
1415
os:
1516
- ubuntu-latest
16-
- windows-latest
17-
- macOS-latest
17+
# - windows-latest
18+
# - macOS-latest
1819
version:
19-
- stable
20+
# - stable
21+
# - 1.6.18
22+
- binary:stable
23+
- binary:1.6.18
2024

2125
steps:
22-
- uses: actions/checkout@v1
23-
- uses: jiro4989/setup-nim-action@master
24-
with:
25-
nim-version: ${{ matrix.version }}
26+
- uses: actions/checkout@v4
2627

27-
- name: Print Nim version
28-
run: nim -v
2928

30-
- name: Print Nimble version
31-
run: nimble -v
29+
#
30+
# Nim
31+
#
32+
- name: Cache Nim binaries
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
nimdir
37+
~/.nimble
38+
key: "nim-${{ matrix.version }}-${{ matrix.os }}"
3239

33-
- name: Nimble Refresh
34-
run: nimble -y refresh
40+
- name: Check for cached Nim binaries
41+
id: nim-binaries-cache
42+
run: |
43+
if [ -f "nimdir/bin/nim" ]; then
44+
echo "found=true" >> $GITHUB_OUTPUT
45+
else
46+
echo "found=false" >> $GITHUB_OUTPUT
47+
fi
3548
36-
- name: Nimble Install dependencies
37-
run: nimble -y install --depsOnly
49+
- name: Install Nim (if not cached)
50+
if: steps.nim-binaries-cache.outputs.found == 'false'
51+
uses: iffy/install-nim@v5
52+
with:
53+
version: ${{ matrix.version }}
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3856

39-
- name: Build binaries
40-
run: nimble build -d:release
57+
- name: Add cached Nim to PATH
58+
if: steps.nim-binaries-cache.outputs.found == 'true'
59+
run: |
60+
echo "${{ github.workspace }}/nimdir/bin" >> $GITHUB_PATH
61+
echo "$HOME/.nimble/bin" >> $GITHUB_PATH
62+
63+
64+
#
65+
# Nim
66+
#
67+
- name: Print Nim version
68+
run: |
69+
nim -v
70+
71+
- name: Print Nimble version
72+
run: |
73+
nimble -v
74+
75+
- name: Nimble Refresh
76+
run: nimble -y refresh
77+
78+
- name: Nimble Install dependencies
79+
run: nimble -y install --depsOnly
80+
81+
- name: Build binaries
82+
run: nimble build -d:release

0 commit comments

Comments
 (0)