Skip to content

awscredlib CI

awscredlib CI #282

Workflow file for this run

#
# s3fs-fuse-awscred-lib ( s3fs-fuse credential I/F library for AWS )
#
# Copyright 2022 Takeshi Nakatani <ggtakec@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: awscredlib 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:
# [NOTE]
# The following OS is not built because the version of cmake is low:
# ubuntu:24.04
# ubuntu:22.04
# ubuntu:20.04
# debian:bookworm
# debian:bullseye
# rockylinux:9
# rockylinux:8
# fedora:41
# fedora:40
# opensuse/leap:15
# alpine:3.21
#
container:
- ubuntu:24.04
- ubuntu:22.04
- ubuntu:20.04
- debian:bookworm
- debian:bullseye
- rockylinux:9
- rockylinux:8
- fedora:41
- fedora:40
- opensuse/leap:15
- alpine:3.21
container:
image: ${{ matrix.container }}
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
if: matrix.container == 'opensuse/leap:15'
run: |
zypper install -y tar gzip
- name: Checkout source code
uses: actions/checkout@v4
- name: Install packages
run: |
.github/workflows/linux-ci-helper.sh ${{ matrix.container }}
# [NOTE]
# In Rocky Linux and OpenSUSE, a "missing crypto_LIBRARY" error occurs
# because the static crypto library does not exist.
# Therefore, set USE_OPENSSL=OFF and use AWS-LC.
# Need to run prefetch_crt_dependency.sh beforehand for build errors
# on alpine.
#
- name: Build aws-sdk-cpp
run: |
mkdir -p /tmp/aws-sdk/sdk_build
cd /tmp/aws-sdk
git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp
if [ "${{ matrix.container }}" = "alpine:3.21" ]; then
cd aws-sdk-cpp
./prefetch_crt_dependency.sh
fi
cd /tmp/aws-sdk/sdk_build
if [ "${{ matrix.container }}" = "rockylinux:8" ] || [ "${{ matrix.container }}" = "opensuse/leap:15" ]; then
cmake ../aws-sdk-cpp -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/tmp/aws-sdk/aws-sdk-cpp -DBUILD_ONLY="core;identity-management" -DAUTORUN_UNIT_TESTS=OFF -DUSE_OPENSSL=OFF
else
cmake ../aws-sdk-cpp -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/tmp/aws-sdk/aws-sdk-cpp -DBUILD_ONLY="core;identity-management" -DAUTORUN_UNIT_TESTS=OFF
fi
make
make install
- name: Build
run: |
cmake -S . -B build
cmake --build build
- name: Test
run: |
mkdir "${HOME}"/.aws
echo "[default]" > "${HOME}"/.aws/config
printf "%s\n%s\n%s\n" "[default]" "aws_access_key_id = TESTAWSACCESSKEYID" "aws_secret_access_key = TESTSECRETAWSACCESSKEYID" > "${HOME}"/.aws/credentials
./build/s3fsawscred_test | grep -v '[E|e]xpiration' | sed -e "s/Version .*$/Version/g" > /tmp/s3fsawscred_test.result
diff .github/workflows/s3fsawscred_test.result /tmp/s3fsawscred_test.result
macos14:
runs-on: macos-14
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install packages
run: |
brew install aws-sdk-cpp
- name: Build
run: |
cmake -S . -B build
cmake --build build
- name: Test
run: |
mkdir "${HOME}"/.aws
echo "[default]" > "${HOME}"/.aws/config
printf "%s\n%s\n%s\n" "[default]" "aws_access_key_id = TESTAWSACCESSKEYID" "aws_secret_access_key = TESTSECRETAWSACCESSKEYID" > "${HOME}"/.aws/credentials
./build/s3fsawscred_test | grep -v '[E|e]xpiration' | sed -e "s/Version .*$/Version/g" > /tmp/s3fsawscred_test.result
diff .github/workflows/s3fsawscred_test.result /tmp/s3fsawscred_test.result
#
# 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
#