Skip to content

Commit 79adaf9

Browse files
1480c1lu-zero
authored andcommitted
Actions: Use official cache and setup-msys2
Signed-off-by: Christopher Degawa <[email protected]>
1 parent 4a71a9d commit 79adaf9

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

.github/workflows/windows.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,37 @@ jobs:
1313
CXX: ccache g++
1414
steps:
1515
- uses: actions/[email protected]
16-
- name: Get msys2
17-
shell: pwsh
18-
run: |
19-
Write-Output "::add-path::C:/msys64/usr/bin"
20-
Write-Output "::add-path::C:/msys64/mingw64/bin"
16+
- name: Setup ccache dir
17+
run: Write-Output "::set-env name=CCACHE_DIR::$PWD/.ccache"
2118

2219
- name: Cache ccache
2320
id: cache-msys64
24-
uses: 1480c1/cache@mabs
21+
uses: actions/cache@v2
2522
with:
26-
path: C:\msys64\home\runneradmin\.ccache
23+
path: .ccache
2724
key: ${{ runner.os }}-msys64-${{ hashFiles('**/*.c') }}
2825
restore-keys: ${{ runner.os }}-msys64-
29-
- name: Cache pacman packages
30-
uses: 1480c1/cache@mabs
31-
with:
32-
path: C:\msys64\var\cache\pacman\pkg
33-
key: ${{ runner.os }}-pacman
3426

35-
- name: First run
36-
run: bash -lc 'exit'
37-
38-
- name: Install packages
39-
run: pacman -S --needed --ask=20 --noconfirm autoconf make automake-wrapper libtool mingw-w64-x86_64-ccache mingw-w64-x86_64-gcc
27+
- uses: msys2/setup-msys2@v2
28+
with:
29+
msystem: MINGW64
30+
install: autoconf make automake-wrapper libtool mingw-w64-x86_64-ccache mingw-w64-x86_64-gcc
31+
update: true
4032

4133
- name: Run autoreconf
42-
run: perl -S /usr/bin/autoreconf -fiv
34+
shell: msys2 {0}
35+
run: autoreconf -fiv
4336

4437
- name: Run Configure
45-
run: bash configure --prefix=/mingw64
38+
shell: msys2 {0}
39+
run: ./configure --prefix=/mingw64
4640

4741
- name: Run make
42+
shell: msys2 {0}
4843
run: make -j4 install
4944

5045
- name: Print ccache info and clean pacman
46+
shell: msys2 {0}
5147
run: |
52-
bash -c 'ccache -s'
48+
ccache -s
5349
pacman -Sc --noconfirm

0 commit comments

Comments
 (0)