-
Notifications
You must be signed in to change notification settings - Fork 5
157 lines (138 loc) · 4.66 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#
# s3fs-fuse-awscred-lib ( s3fs-fuse credential I/F library for AWS )
#
# Copyright 2022 Takeshi Nakatani <[email protected]>
#
# 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:21.10
# ubuntu:18.04
# debian:stretch
# centos:centos7
#
# This is temporarily disabled.
# opensuse/leap:15
#
container:
- ubuntu:22.04
- ubuntu:20.04
- debian:bookworm
- debian:bullseye
- rockylinux:9
- rockylinux:8
- fedora:39
- fedora:38
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
run: |
if [ "${{ matrix.container }}" = "opensuse/leap:15" ]; then zypper install -y tar gzip; fi
- name: Checkout source code
uses: actions/checkout@v2
- 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.
#
- 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
cd sdk_build
if [ "${{ matrix.container }}" = "rockylinux:8" ] || [ "${{ matrix.container }}" = "opensuse/leap:15" ]; then
cmake ../aws-sdk-cpp -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/home/ggtakec/work/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=/home/ggtakec/work/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
macos12:
runs-on: macos-12
steps:
- name: Checkout source code
uses: actions/checkout@v2
- 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
#