-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (105 loc) · 5.04 KB
/
build.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
on: push
jobs:
build-php-client:
runs-on: ubuntu-latest
container: golang:latest
steps:
- name: Check Go Version
run: |
go version
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin
- name: Install Go Dependencies
run: |
apt-get update
apt-get install -y protobuf-compiler
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- name: Stable with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustc --version
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Check php Version
run: |
php --version
- name: Install other dependencies
run: |
apt-get install -y clang
export LIBCLANG_PATH="/usr/lib/llvm-14/lib/"
apt-get install -y php-dev
apt-get install -y rpm
- name: Checkout aerospike php client
uses: actions/checkout@v4
with:
repository: 'aerospike/php-client'
ref: 'CLIENT-2836-pkg'
- name: Build Aerospike connection manager
run: |
git config --global --add safe.directory '*'
cd aerospike-connection-manager
make clean
make proto
make build
- name: Build aerospike php client library
run: |
ls
cargo build --release
- name: Package for deb
run: |
mkdir -p pkg/deb/aerospike-php-client-deb
mkdir -p pkg/deb/aerospike-php-client-deb/DEBIAN
mkdir -p pkg/deb/aerospike-php-client-deb/etc
mkdir -p pkg/deb/aerospike-php-client-deb/usr/bin
mkdir -p pkg/deb/aerospike-php-client-deb/usr/lib
cp aerospike-connection-manager/asld pkg/deb/aerospike-php-client-deb/usr/bin
cp aerospike-connection-manager/asld.toml pkg/deb/aerospike-php-client-deb/etc
cp target/release/libaerospike_php.so pkg/deb/aerospike-php-client-deb/usr/lib
cp pkg/deb/control pkg/deb/aerospike-php-client-deb/DEBIAN/
cp pkg/deb/scripts/postinst pkg/deb/aerospike-php-client-deb/DEBIAN/
dpkg-deb --build pkg/deb/aerospike-php-client-deb
cp pkg/deb/aerospike-php-client-deb.deb pkg/deb/aerospike-php-client-1.0.2-x86_64.deb
cp pkg/deb/aerospike-php-client-deb.deb pkg/deb/aerospike-php-client-1.0.2-aarch64.deb
ls pkg/deb/
rm -rf pkg/deb/aerospike-php-client-deb*
- name: Package for RPM
run: |
mkdir -p pkg/rpm/Aerospike-php-client-rpm/SPECS
mkdir -p pkg/rpm/Aerospike-php-client-rpm/SOURCES
cp pkg/rpm/scripts/postinst pkg/rpm/Aerospike-php-client-rpm/SOURCES
cp aerospike-connection-manager/asld pkg/rpm/Aerospike-php-client-rpm/SOURCES
cp aerospike-connection-manager/asld.toml pkg/rpm/Aerospike-php-client-rpm/SOURCES
cp target/release/libaerospike_php.so pkg/rpm/Aerospike-php-client-rpm/SOURCES
cp pkg/rpm/aerospike-php-client.spec pkg/rpm/Aerospike-php-client-rpm/SPECS
cd pkg/rpm/Aerospike-php-client-rpm/SOURCES
tar -czvf aerospike-php-client-1.0.2.tar.gz *
pwd
cd ..
rpmbuild -ba SPECS/aerospike-php-client.spec
mv ../RPMS/noarch/aerospike-php-client-1.0.2-1.noarch.rpm ../../aerospike-php-client-1.0.2-noarch.rpm
- name: Move RPM to artifacts
uses: actions/upload-artifact@v2
with:
name: aerospike-php-client-rpm
path: pkg/rpm/aerospike-php-client-1.0.2-noarch.rpm
- name: Move DEB x86_64 to artifacts
uses: actions/upload-artifact@v2
with:
name: aerospike-php-client-deb-x86_64
path: pkg/deb/aerospike-php-client-1.0.2-x86_64.deb
- name: Move DEB aarch64 to artifacts
uses: actions/upload-artifact@v2
with:
name: aerospike-php-client-deb-aarch64
path: pkg/deb/aerospike-php-client-1.0.2-aarch64.deb