-
Notifications
You must be signed in to change notification settings - Fork 3
157 lines (144 loc) · 5.14 KB
/
ci.yml
File metadata and controls
157 lines (144 loc) · 5.14 KB
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
#
# CHMPX
#
# Copyright 2020 Yahoo Japan corporation.
#
# CHMPX is inprocess data exchange by MQ with consistent hashing.
# CHMPX is made for the purpose of the construction of
# original messaging system and the offer of the client
# library.
# CHMPX transfers messages between the client and the server/
# slave. CHMPX based servers are dispersed by consistent
# hashing and are automatically laid out. As a result, it
# provides a high performance, a high scalability.
#
# For the full copyright and license information, please view
# the license file that was distributed with this source code.
#
# AUTHOR: Takeshi Nakatani
# CREATE: Wed, Nov 18 2020
# REVISION: 1.0
#
#------------------------------------------------------------------------------------
# Github Actions
#------------------------------------------------------------------------------------
name: NodeJS addon AntPickax CI
#
# Events
#
on:
push:
branches-ignore:
- 'gh-pages'
tags:
- '*'
pull_request:
#
# CRON event is fire on every sunday(UTC).
#
schedule:
- cron: '0 15 * * 0'
#
# Npm Trusted Publishing + OIDC
#
permissions:
contents: write
id-token: write
#
# Jobs
#
jobs:
build:
runs-on: ubuntu-latest
strategy:
#
# do not stop jobs automatically if any of the jobs fail
#
fail-fast: false
matrix:
container:
- ubuntu:26.04
- ubuntu:24.04
- ubuntu:22.04
- debian:trixie
- debian:bookworm
- debian:bullseye
- rockylinux/rockylinux:10
- rockylinux:9
- rockylinux:8
- fedora:44
- fedora:43
- alpine:3.23
- alpine:3.22
- alpine:3.21
node-version:
- 22
- 24
container:
image: ${{ matrix.container }}
env:
#
# Installation special environment variables for ubuntu(debian).
#
DEBIAN_FRONTEND: noninteractive
# [NOTE] about shell
# In rockylinux:10, an error occurs when executing that the shell(sh) cannot be found.
# Therefore, each step is executed with an explicit shell(specified full path like /bin/sh).
#
steps:
#
# Checks-out your repository under $GITHUB_WORKSPACE, so your
# job can access it
#
- name: Checkout sources
uses: actions/checkout@v6
#
# Set environments from secrets
#
# [NOTE] Secrets
# Use Secrets of organization or repository as parameters to
# pass to nodejs_addon_helper.sh for building and packaging.
#
# The available Secret variables are listed below:
# GITHUB_TOKEN : Github token(automatically set by github actions)
# NODEJS_TYPE_VARS_FILE : specify custom variables file
# FORCE_PUBLISHER : nodejs major version to publish packages
# FORCE_NOT_PUBLISHER : do not allow to publish any packages(for forked repository)
# USE_PACKAGECLOUD_REPO : true means using pacakgecloud.io repo, false is not using
# PACKAGECLOUD_OWNER : owner name as a pat of path to packagcloud.io for downloading
# PACKAGECLOUD_DOWNLOAD_REPO : repo name as a pat of path to packagcloud.io for downloading
# NPM_TOKEN : [Deprecated] The token for publishing to npm
#
# NPM Trusted Publisher for NPM package should be set, so you won't need
# to specify NPM_TOKEN.
# If you set NPM_TOKEN(not recommended), it will be used to publish.
# When publishing a package to an NPM repository, you need to upload the
# package for the first time and then configure NPM Trusted Publisher.
# For this reason, specify NPM_TOKEN the first time you upload a package.
# From the second time onwards (after configuring NPM Trusted Publisher),
# delete NPM_TOKEN.
#
- name: Set environments from secrets
run: |
echo "ENV_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "${GITHUB_ENV}"
echo "ENV_NODEJS_TYPE_VARS_FILE=${{ secrets.NODEJS_TYPE_VARS_FILE }}" >> "${GITHUB_ENV}"
echo "ENV_FORCE_PUBLISHER=${{ secrets.FORCE_PUBLISHER }}" >> "${GITHUB_ENV}"
echo "ENV_FORCE_NOT_PUBLISHER=${{ secrets.FORCE_NOT_PUBLISHER }}" >> "${GITHUB_ENV}"
echo "ENV_USE_PACKAGECLOUD_REPO=${{ secrets.USE_PACKAGECLOUD_REPO }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_OWNER=${{ secrets.PACKAGECLOUD_OWNER }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_DOWNLOAD_REPO=${{ secrets.PACKAGECLOUD_DOWNLOAD_REPO }}" >> "${GITHUB_ENV}"
echo "ENV_NPM_TOKEN=${{ secrets.NPM_TOKEN }}" >> "${GITHUB_ENV}"
#
# Run building and packaging helper
#
- name: Run building and packaging
run: |
/bin/sh -c "$GITHUB_WORKSPACE/.github/workflows/nodejs_addon_helper.sh -os ${{ matrix.container }} -node ${{ matrix.node-version }}"
#
# 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
#