-
Notifications
You must be signed in to change notification settings - Fork 69
129 lines (129 loc) · 4.01 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Github Actions CI
on:
pull_request:
schedule:
# Every friday
- cron: '0 0 * * 5'
jobs:
unit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu
os: ubuntu-latest
- name: No FUSE
os: ubuntu-latest
disable_fuse: "--disable-fuse"
check_features: demo
- name: distcheck
os: ubuntu-latest
- name: Old distro
os: ubuntu-20.04
- name: Mac
os: macos-latest
env:
CHECK_FEATURES: ${{ matrix.check_features }}
DISABLE_FUSE: ${{ matrix.disable_fuse }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: apt dependencies
run: >
sudo apt-get update &&
sudo apt-get install -y automake autoconf libtool pkgconf
zlib1g-dev liblzo2-dev liblzma-dev liblz4-dev libzstd-dev
fio
if: runner.os == 'Linux'
- name: apt fuse 2
run: sudo apt-get install -y libfuse-dev fuse
if: matrix.os == 'ubuntu-20.04'
- name: apt fuse 3
run: sudo apt-get install -y libfuse3-dev fuse3
if: matrix.os == 'ubuntu-latest'
- name: homebrew dependencies
env:
HOMEBREW_NO_AUTO_UPDATE: 1
run: |
brew list
brew remove pkgconfig
brew install autoconf automake libtool pkgconf squashfs coreutils
brew install --cask macfuse
brew list pkgconf
ls -l /opt/homebrew/bin/pkg*
if: runner.os == 'macOS'
- name: configure
run: |
./autogen.sh
CPPFLAGS="-Werror" ./configure $DISABLE_FUSE
- name: build
run: |
make -j2 V=1
if: matrix.name != 'distcheck'
- name: test
run: |
make check
diff -u ci/expected-features/${CHECK_FEATURES:-all} ci/features
if: runner.os != 'macOS' && matrix.name != 'distcheck'
- name: test mac
run: |
# On macOS loading the macfuse extension is needed. This
# command should load it without rebooting, except System
# Integrity Protection disallows it, so the tests get skipped
# there. This command came from
# https://github.com/actions/runner-images/issues/4731
if sudo kextload /Library/Filesystems/macfuse.fs/Contents/Extensions/$(sw_vers -productVersion|cut -d. -f1)/macfuse.kext; then
make check
diff -u ci/expected-features/${CHECK_FEATURES:-all} ci/features
fi
if: runner.os == 'macOS'
- name: distcheck
run: |
make distcheck
if: matrix.name == 'distcheck'
- name: install
run: sudo make install
if: matrix.name != 'distcheck'
- name: output
run: |
cp /tmp/*.log . || true
mksquashfs > mksquashfs.log || true
if: always()
- name: upload
uses: actions/upload-artifact@v4
with:
name: logs ${{ matrix.name }}
path: |
*.log
tests/*.log
ci/features
if: always()
windows:
runs-on: windows-2019
steps:
- name: install chocolatey dependencies
shell: powershell
run: choco install -y squashfs
- name: setup msbuild
uses: microsoft/[email protected]
- name: checkout
uses: actions/checkout@v2
- name: generate header
shell: bash
run: ./gen_swap.sh squashfs_fs.h
- name: build
working-directory: ./win
shell: powershell
run: MSBuild.exe squashfuse_ls.vcxproj -p:PlatformToolset=v142
- name: test
working-directory: ./win
shell: bash
run: |
set -x
mkdir test
touch test/foo test/bar test/'iggy blah'
mksquashfs test test.squashfs
ls test | sort > expected
./Debug/squashfuse_ls.exe test.squashfs | dos2unix | sort > actual
diff -u expected actual