-
Notifications
You must be signed in to change notification settings - Fork 2
141 lines (128 loc) · 4.42 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
#
# K2HDKC PHP Extension library
#
# Copyright 2023 Yahoo Japan Corporation.
#
# K2HDKC is k2hash based distributed KVS cluster.
# K2HDKC uses K2HASH, CHMPX, FULLOCK libraries. K2HDKC supports
# distributed KVS cluster server program and client libraries.
#
# For the full copyright and license information, please view
# the license file that was distributed with this source code.
#
# AUTHOR: Takeshi Nakatani
# CREATE: Fri, Feb 24 2022
# REVISION:
#
#----------------------------------------------------------
# Github Actions
#----------------------------------------------------------
name: PHP AntPickax CI
#
# Events
#
on:
push:
pull_request:
#
# CRON event is fire on every sunday(UTC).
#
schedule:
- cron: '0 15 * * 0'
#
# Jobs
#
jobs:
build:
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:
- ubuntu:24.04
- ubuntu:22.04
- ubuntu:20.04
- debian:bookworm
- debian:bullseye
- rockylinux:9
- rockylinux:8
- fedora:41
- fedora:40
- alpine:3.20
- alpine:3.19
- alpine:3.18
php:
- PHP81
- PHP82
- PHP83
container:
image: ${{ matrix.container }}
env:
#
# Installation special environment variables for ubuntu(debian).
#
DEBIAN_FRONTEND: noninteractive
#
# For PHP Unit test
#
NO_INTERACTION: 1
steps:
- name: Checkout source code
uses: actions/checkout@v4
#
# Set environments from secrets
#
# [NOTE] Secrets
# Use Secrets of organization or repository as parameters to
# pass to build_helper.sh for building and packaging, .
#
# The available Secret variables are listed below:
# PHPEXTTYPE_VARS_FILE : specify custom variables file
# BUILD_NUMBER : buld number for packaging
# DEVELOPER_FULLNAME : developer name for package
# DEVELOPER_EMAIL : developer e-mail for package
# FORCE_PUBLISH : true means force to publish packages, false means never publish
# USE_PACKAGECLOUD_REPO : true means using pacakgecloud.io repo, false is not using
# * PACKAGECLOUD_TOKEN : The token for publishing to packagcloud.io
# PACKAGECLOUD_OWNER : owner name as a part of path to packagcloud.io for publishing/downloading
# PACKAGECLOUD_PUBLISH_REPO : repo name as a part of path to packagcloud.io for publishing
# PACKAGECLOUD_DOWNLOAD_REPO : repo name as a part of path to packagcloud.io for downloading
#
# "PACKAGECLOUD_TOKEN" is a required variable to publish the
# package.
#
- name: Set environments from secrets
run: |
echo "ENV_PHPEXTTYPE_VARS_FILE=${{ secrets.PHPEXTTYPE_VARS_FILE }}" >> "${GITHUB_ENV}"
echo "ENV_BUILD_NUMBER=${{ secrets.BUILD_NUMBER }}" >> "${GITHUB_ENV}"
echo "ENV_DEVELOPER_FULLNAME=${{ secrets.DEVELOPER_FULLNAME }}" >> "${GITHUB_ENV}"
echo "ENV_DEVELOPER_EMAIL=${{ secrets.DEVELOPER_EMAIL }}" >> "${GITHUB_ENV}"
echo "ENV_FORCE_PUBLISH=${{ secrets.FORCE_PUBLISH }}" >> "${GITHUB_ENV}"
echo "ENV_USE_PACKAGECLOUD_REPO=${{ secrets.USE_PACKAGECLOUD_REPO }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_TOKEN=${{ secrets.PACKAGECLOUD_TOKEN }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_OWNER=${{ secrets.PACKAGECLOUD_OWNER }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_PUBLISH_REPO=${{ secrets.PACKAGECLOUD_PUBLISH_REPO }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_DOWNLOAD_REPO=${{ secrets.PACKAGECLOUD_DOWNLOAD_REPO }}" >> "${GITHUB_ENV}"
#
# Run building and packaging helper
#
- name: Run building and packaging
run: |
/bin/sh -c "$GITHUB_WORKSPACE/.github/workflows/phpext_helper.sh -os ${{ matrix.container }} -php ${{ matrix.php }}"
#
# 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
#