forked from ballerina-platform/ballerina-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (111 loc) · 4.32 KB
/
pull_request_full_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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI Full Build Ubuntu
on:
pull_request:
branches:
- master
jobs:
build-lang:
name: Build Ballerina Lang
runs-on: ubuntu-latest
timeout-minutes: 120
concurrency:
group: ${{ github.head_ref }}-FBP-lang
cancel-in-progress: true
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout To Lang Branch
run: |
git checkout ${{ github.event.inputs.ballerina_lang_branch }}
- name: Get Lang Version
id: lang-version
run: |
VERSION=$((grep -w "version" | cut -d= -f2) < gradle.properties)
echo "::set-output name=version::$VERSION"
- name: Build ballerina-lang
run: |
./gradlew clean build -x check publishToMavenLocal --stacktrace --scan
- name: Archive Lang Artifacts
uses: actions/upload-artifact@v2
with:
name: Ballerina Lang Artifacts
path: ~/.m2/
outputs:
lang_version: ${{ steps.lang-version.outputs.version }}
build-stdlib-level:
needs: build-lang
name: Build Stdlib Level
runs-on: ubuntu-latest
timeout-minutes: 120
concurrency:
group: ${{ github.head_ref }}-FBP-stdlib-${{ matrix.level }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
level: [ 1, 2, 3, 4, 5, 6, 7, 8 ]
steps:
- name: Download Ballerina Lang Artifacts
uses: actions/download-artifact@v2
with:
name: Ballerina Lang Artifacts
path: ~/.m2/
- name: Download Module Data
run: |
wget https://raw.githubusercontent.com/ballerina-platform/ballerina-release/master/dependabot/resources/extensions.json
wget https://raw.githubusercontent.com/ballerina-platform/ballerina-distribution/2201.0.x/gradle.properties
- name: Clone Modules
run: |
for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); \
do git clone https://github.com/ballerina-platform/${module_name}.git; \
done
# - name: Checkout non-default branch
# run: |
# for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); \
# do
# cd $module_name
# git fetch origin
# git checkout -t origin/update4 || :
# cd ..
# done
- name: Update Lang Version in Module
run: |
for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); do \
perl -pi -e "s/^\s*ballerinaLangVersion=.*/ballerinaLangVersion=${{ needs.build-lang.outputs.lang_version }}/" ${module_name}/gradle.properties; \
done
- name: Build Module
run: |
for module_name in $(jq -r '.standard_library| .[] | select(.level==${{ matrix.level }}) | .name' extensions.json); do \
echo "Building Standard Library: $module_name" && \
cd $module_name && ./gradlew clean build --stacktrace --scan && cd ..; \
done
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
build-distribution:
needs: build-lang
name: Build Ballerina Distribution
runs-on: ubuntu-latest
timeout-minutes: 120
concurrency:
group: ${{ github.head_ref }}-FBP-distribution
cancel-in-progress: true
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
repository: 'ballerina-platform/ballerina-distribution'
- name: Download Ballerina Lang Artifacts
uses: actions/download-artifact@v2
with:
name: Ballerina Lang Artifacts
path: ~/.m2/
- name: Update Lang Version in Module
run: |
perl -pi -e "s/^\s*ballerinaLangVersion=.*/ballerinaLangVersion=${{ needs.build-lang.outputs.lang_version }}/" gradle.properties
- name: Build Module
run: ./gradlew clean build --stacktrace --scan --console=plain --no-daemon --continue -x :project-api-tests:test
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
devCentralToken: ${{ secrets.BALLERINA_DEV_CENTRAL_ACCESS_TOKEN }}