2020-12-02 17:49:58 +00:00
#
# s3fs - FUSE-based file system backed by Amazon S3
#
# Copyright(C) 2007 Takeshi Nakatani <ggtakec.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
name : s3fs-fuse CI
on :
push :
pull_request :
#
# CRON event is fire on every sunday(UTC).
#
schedule :
- cron : '0 0 * * 0'
#
# Jobs
#
jobs :
Linux :
runs-on : ubuntu-latest
#
# build matrix for containers
#
strategy :
#
# do not stop jobs automatically if any of the jobs fail
#
fail-fast : false
#
# matrix for containers
#
matrix :
container :
2022-06-22 08:40:08 +00:00
- ubuntu:22.04
2020-12-02 17:49:58 +00:00
- ubuntu:20.04
- ubuntu:18.04
2022-01-09 03:11:00 +00:00
- debian:bullseye
2020-12-02 17:49:58 +00:00
- debian:buster
2022-11-21 14:13:53 +00:00
- rockylinux:9
2022-02-20 02:46:01 +00:00
- rockylinux:8
2020-12-02 17:49:58 +00:00
- centos:centos7
2022-11-21 14:13:53 +00:00
- fedora:37
2022-06-22 08:40:08 +00:00
- fedora:36
2020-12-02 17:49:58 +00:00
- opensuse/leap:15
container :
image : ${{ matrix.container }}
options : "--privileged --cap-add SYS_ADMIN --device /dev/fuse"
env :
# [NOTE]
# Installation special environment variables for debian and ubuntu.
#
DEBIAN_FRONTEND : noninteractive
steps :
# [NOTE]
# On openSUSE, tar and gzip must be installed before action/checkout.
#
- name : Install packages before checkout
run : |
if [ "${{ matrix.container }}" = "opensuse/leap:15" ]; then zypper install -y tar gzip; fi
- name : Checkout source code
2022-11-05 06:08:42 +00:00
uses : actions/checkout@v3
2020-12-02 17:49:58 +00:00
# [NOTE]
# Matters that depend on OS:VERSION are determined and executed in the following script.
# Please note that the option to configure (CONFIGURE_OPTIONS) is set in the environment variable.
#
2022-01-03 10:50:13 +00:00
- name : Install packages
2020-12-02 17:49:58 +00:00
run : |
.github/workflows/linux-ci-helper.sh ${{ matrix.container }}
- name : Build
run : |
./autogen.sh
/bin/sh -c "./configure ${CONFIGURE_OPTIONS}"
2022-01-09 11:22:49 +00:00
make --jobs=$(nproc)
2020-12-02 17:49:58 +00:00
- name : Cppcheck
run : |
2022-01-23 14:10:09 +00:00
# work around resource leak false positives on older Linux distributions
if cppcheck --version | awk '{if ($2 <= 1.86) { exit(1) } }'; then
make cppcheck
fi
2020-12-02 17:49:58 +00:00
2022-01-15 17:08:46 +00:00
- name : Shellcheck
run : |
make shellcheck
2020-12-02 17:49:58 +00:00
- name : Test suite
run : |
2021-07-02 00:01:10 +00:00
make ALL_TESTS=1 check -C test || (test/filter-suite-log.sh test/test-suite.log; exit 1)
2020-12-02 17:49:58 +00:00
# [NOTE]
# A case of "runs-on: macos-11.0" does not work,
2022-01-03 10:50:13 +00:00
# because load_osxfuse returns exit code = 1.
2020-12-02 17:49:58 +00:00
# Maybe it needs to reboot. Apple said
# "Installing a new kernel extension requires signing in as an Admin user. You must also restart your Mac to load the extension".
2022-01-03 10:50:13 +00:00
# Then we do not use macos 11 on GitHub Actions now.
2020-12-02 17:49:58 +00:00
#
macos10 :
runs-on : macos-10.15
steps :
- name : Checkout source code
2022-11-05 06:08:42 +00:00
uses : actions/checkout@v3
2020-12-02 17:49:58 +00:00
- name : Brew tap
run : |
TAPS="$(brew --repository)/Library/Taps";
if [ -e "$TAPS/caskroom/homebrew-cask" ]; then rm -rf "$TAPS/caskroom/homebrew-cask"; fi;
2020-12-23 10:34:04 +00:00
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/homebrew-cask
2020-12-02 17:49:58 +00:00
- name : Install osxfuse
run : |
2021-01-20 13:43:42 +00:00
HOMEBREW_NO_AUTO_UPDATE=1 brew install osxfuse
2020-12-02 17:49:58 +00:00
- name : Install brew other packages
run : |
2022-01-15 17:08:46 +00:00
S3FS_BREW_PACKAGES='automake cppcheck python3 coreutils gnu-sed shellcheck';
2020-12-02 17:49:58 +00:00
for s3fs_brew_pkg in ${S3FS_BREW_PACKAGES}; do if brew list | grep -q ${s3fs_brew_pkg}; then if brew outdated | grep -q ${s3fs_brew_pkg}; then HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade ${s3fs_brew_pkg}; fi; else HOMEBREW_NO_AUTO_UPDATE=1 brew install ${s3fs_brew_pkg}; fi; done;
2022-04-17 06:06:11 +00:00
- name : Install awscli2
2020-12-02 17:49:58 +00:00
run : |
2022-04-17 06:06:11 +00:00
cd /tmp
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
2020-12-02 17:49:58 +00:00
- name : Check osxfuse permission
run : |
if [ -f /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs ]; then sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs; elif [ -f /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse ]; then sudo chmod +s /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse; else exit 1; fi
- name : Build
run : |
./autogen.sh
PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig ./configure CXXFLAGS='-std=c++03 -DS3FS_PTHREAD_ERRORCHECK=1'
2022-01-09 11:22:49 +00:00
make --jobs=$(sysctl -n hw.ncpu)
2020-12-02 17:49:58 +00:00
- name : Cppcheck
run : |
make cppcheck
2022-01-15 17:08:46 +00:00
- name : Shellcheck
run : |
make shellcheck
2020-12-02 17:49:58 +00:00
- name : Test suite
run : |
make check -C src
echo "user_allow_other" | sudo tee -a /etc/fuse.conf >/dev/null
if [ -f /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs ]; then /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs; elif [ -f /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse ]; then /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse; else exit 1; fi
2021-07-01 23:41:47 +00:00
make ALL_TESTS=1 check -C test || (test/filter-suite-log.sh test/test-suite.log; exit 1)
2020-12-02 17:49:58 +00:00
#
# Local variables:
# tab-width: 4
# c-basic-offset: 4
# End:
# vim600: expandtab sw=4 ts=4 fdm=marker
# vim<600: expandtab sw=4 ts=4
#