-
Notifications
You must be signed in to change notification settings - Fork 71
113 lines (95 loc) · 3.22 KB
/
clp-core-build.yaml
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
name: build-clp-core
on:
push:
paths:
- '.github/workflows/clp-core-build.yaml'
- 'components/core/**'
- '!components/core/tools/scripts/lib_install/macos-12/**'
pull_request:
paths:
- '.github/workflows/clp-core-build.yaml'
- 'components/core/**'
- '!components/core/tools/scripts/lib_install/macos-12/**'
workflow_dispatch:
workflow_run:
workflows: ["generate-build-dependency-image"]
branches: [main]
types:
- completed
env:
REGISTRY: ghcr.io
IMAGE_NAME_BASE: ${{github.repository}}/clp-core-x86
concurrency: build-${{github.ref}}
jobs:
build-focal:
runs-on: ubuntu-latest
container:
image: ghcr.io/y-scope/clp/clp-core-dependencies-x86-ubuntu-focal:main
volumes:
- ${{github.workspace}}/build:/output
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Workaround actions/runner-images/issues/6775
run: chown $(id -u):$(id -g) -R .
- name: Build CLP Core
id: build
uses: ./.github/actions/clp-core-build
- name: Upload CLP Binary artifact
uses: actions/upload-artifact@main
with:
name: clp-binaries-focal
path: ${{github.workspace}}/clp-binaries-focal.tar
if-no-files-found: error
build-clp-core-image:
needs: build-focal
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Workaround actions/runner-images/issues/6775
run: chown $(id -u):$(id -g) -R .
- name: Download built CLP Binaries
uses: actions/download-artifact@v2
with:
name: clp-binaries-focal
path: ${{github.workspace}}/binaries
- name: Extract Binaries Bundle
run: tar -xvf clp-binaries-focal.tar
working-directory: ${{github.workspace}}/binaries
- name: Build and Push Ubuntu Focal Docker Image
uses: ./.github/actions/clp-docker-build-push-action
with:
image_name: ${{env.IMAGE_NAME_BASE}}-ubuntu-focal
context: ${{github.workspace}}/binaries
file: components/core/tools/docker-images/clp-core-focal/Dockerfile
token: ${{secrets.GITHUB_TOKEN}}
push_image: ${{'pull_request' != github.event_name && 'refs/heads/main' == github.ref}}
build-bionic:
runs-on: ubuntu-latest
container: ghcr.io/y-scope/clp/clp-core-dependencies-x86-ubuntu-bionic:main
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Workaround actions/runner-images/issues/6775
run: chown $(id -u):$(id -g) -R .
- name: Build CLP Core
uses: ./.github/actions/clp-core-build
build-centos:
runs-on: ubuntu-latest
container: ghcr.io/y-scope/clp/clp-core-dependencies-x86-centos7.4:main
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Workaround actions/runner-images/issues/6775
run: chown $(id -u):$(id -g) -R .
- name: Build CLP Core
uses: ./.github/actions/clp-core-build