forked from boostorg/boost
-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (130 loc) · 5.41 KB
/
distro.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
# This workflow builds boost and creates the formal release which goes in the website
name: Create release
on:
push:
branches:
- '*' # Run tests on all branches. Upload to AWS if master or develop.
tags:
- boost-* # Run tests on version tags. Upload to AWS with version tag.
pull_request:
branches:
- master # Run tests on PRs. Don't upload.
- develop
concurrency:
group: ${{format('{0}:{1}', github.repository, github.ref)}}
cancel-in-progress: true
jobs:
build:
name: Create releases
runs-on: ubuntu-latest
container:
image: cppalliance/boost_superproject_build:20.04-v1
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Environment
run: |
set -xe
env
pwd
ps -p $$
echo "HOME=/root" >> $GITHUB_ENV
git config --global --add safe.directory /__w/boost/boost
chown -R root:root /__w/boost/boost
ls -al
ls -al /root
ln -s /root/build build
ls .
ls build
- name: Antora setup
run: |
set -xe
apt-get update
apt-get install -y nodejs
node -v
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
PATH=$PATH:${HOME}/.nvm
echo "${HOME}/.nvm" >> $GITHUB_PATH
nvm --version
nvm install --lts
npm i -g npx || true
npm i -g @antora/[email protected] @antora/[email protected]
npm i -g gulp-cli
- name: Checkout post
run: |
python3 ./release/ci_boost_release.py checkout_post
- name: Build
run: |
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
export CIRCLECI=true
export CIRCLE_BRANCH=develop
CIRCLE_WORKING_DIRECTORY=$(pwd)
export CIRCLE_WORKING_DIRECTORY
export JOBS=$(grep -c ^processor /proc/cpuinfo)
echo "JOBS=$JOBS"
python3 ./release/ci_boost_release.py test_override --build-dir=build --releases-dir=releases
- name: Find AWS Release
id: docs-dir
run: |
# Store doc release path
pwd
ls releases
boost_docs_dir=$(find releases -type d -name "boost_*-docs" -print -quit)
echo "$boost_docs_dir"
boost_docs_basename=$(basename "$boost_docs_dir")
echo "boost_docs_basename=$boost_docs_basename"
echo "boost_docs_basename=$boost_docs_basename" >> $GITHUB_OUTPUT
- name: AWS Sync (revsys cluster)
if: github.ref_name == 'develop' || github.ref_name == 'master' || startsWith(github.ref_name, 'refs/tags/boost-')
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.REVSYS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.REVSYS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.REVSYS_ACCESS_KEY }}
AWS_REGION: 'us-east-2'
SOURCE_DIR: ${{ format('releases/{0}', steps.docs-dir.outputs.boost_docs_basename) }}
DEST_DIR: ${{ format('site/{0}', (github.ref_name == 'develop' && 'develop') || (github.ref_name == 'master' && 'master') || github.ref_name_name) }}
- name: AWS Sync (staging on GKE)
if: github.ref_name == 'develop' || github.ref_name == 'master' || startsWith(github.ref_name, 'refs/tags/boost-')
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.BOOST_STAGE_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.BOOST_STAGE_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BOOST_STAGE_ACCESS_KEY }}
AWS_REGION: 'us-east-2'
SOURCE_DIR: ${{ format('releases/{0}', steps.docs-dir.outputs.boost_docs_basename) }}
DEST_DIR: ${{ format('site/{0}', (github.ref_name == 'develop' && 'develop') || (github.ref_name == 'master' && 'master') || github.ref_name_name) }}
- name: AWS Sync (staging on GKE)
if: false && (github.ref_name == 'develop' || github.ref_name == 'master' || startsWith(github.ref_name, 'refs/tags/boost-'))
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.BOOST_PRODUCTION_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.BOOST_PRODUCTION_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BOOST_PRODUCTION_ACCESS_KEY }}
AWS_REGION: 'us-east-2'
SOURCE_DIR: ${{ format('releases/{0}', steps.docs-dir.outputs.boost_docs_basename) }}
DEST_DIR: ${{ format('site/{0}', (github.ref_name == 'develop' && 'develop') || (github.ref_name == 'master' && 'master') || github.ref_name_name) }}
- name: Remove release dirs
run: find "releases" -mindepth 1 -maxdepth 1 -type d -exec rm -r {} +
- name: Publish Releases as Artifacts
if: github.event_name == 'push'
uses: kittaakos/upload-artifact-as-is@v0
with:
path: releases
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/boost-')
with:
files: |
releases/${{ github.ref_name }}*.*