forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws-c-io.yaml
103 lines (94 loc) · 2.72 KB
/
aws-c-io.yaml
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
package:
name: aws-c-io
version: 0.15.2
epoch: 0
description: Module for the AWS SDK for C handling all IO and TLS work for application protocols
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- aws-c-cal-dev
- aws-c-common-dev
- build-base
- busybox
- ca-certificates-bundle
- cmake
- openssf-compiler-options
- openssl-dev
- s2n-tls-dev
- samurai
pipeline:
- uses: git-checkout
with:
expected-commit: b28743ce88b2d0906685c44474d5cab682ac8369
repository: https://github.com/awslabs/aws-c-io
tag: v${{package.version}}
- runs: |
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
CFLAGS="$CFLAGS -flto=auto" \
CXXFLAGS="$CXXFLAGS -flto=auto" \
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=None \
-DBUILD_TESTING="$(want_check && echo ON || echo OFF)" \
-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF \
$CMAKE_CROSSOPTS
cmake --build build
- runs: |
DESTDIR="${{targets.destdir}}" cmake --install build
- uses: strip
subpackages:
- name: aws-c-io-dev
pipeline:
- uses: split/dev
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib
mv "${{targets.destdir}}"/usr/lib/aws-c-io "${{targets.subpkgdir}}"/usr/lib/
dependencies:
runtime:
- openssl-dev
- aws-c-io
description: aws-c-io dev
update:
enabled: true
github:
identifier: awslabs/aws-c-io
strip-prefix: v
use-tag: true
test:
environment:
contents:
packages:
- aws-c-common-dev
- aws-c-io-dev
- bash
- build-base
- gcc
- s2n-tls-dev
pipeline:
- name: "Check aws-c-io Installation"
runs: |
echo "Verifying aws-c-io installation..."
find /usr /usr/local -name 'libaws-c-io.so' || (echo "aws-c-io library not found!" && exit 1)
- name: "Compile and Run aws-c-io Test Program"
runs: |
echo "Testing aws-c-io functionality..."
cat <<EOF > test_io.c
#include <aws/io/io.h>
#include <aws/common/common.h>
#include <stdio.h>
int main() {
struct aws_allocator *allocator = aws_default_allocator();
aws_io_library_init(allocator);
printf("AWS IO library initialized successfully\\n");
aws_io_library_clean_up();
return 0;
}
EOF
gcc test_io.c -o test_io -laws-c-io -laws-c-common
./test_io || (echo "aws-c-io test failed!" && exit 1)