-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (70 loc) · 2.16 KB
/
containers.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
name: Build and publish image
on:
workflow_dispatch:
inputs:
upstream_repository:
required: false
type: string
upstream_job:
required: false
type: string
push:
branches:
- main
paths:
- 'containers/**'
- '.github/workflows/containers.yml'
pull_request:
paths:
- 'containers/**'
- '.github/workflows/containers.yml'
schedule:
- cron: "0 7 * * 1" # Run once weekly
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
BRANCH_NAME: >-
${{ github.event.pull_request.number && 'PR-' }}${{ github.event.pull_request.number || github.ref_name }}
PUBLISH_CONTAINER: 1
jobs:
build-containers:
name: Build CI containers (${{ matrix.container_id }})
runs-on:
- runs-on
- runner=${{ matrix.runner }}
- run-id=${{ github.run_id }}
- tag=build-containers-${{ matrix.container_id }}
strategy:
fail-fast: false
matrix:
container_id:
- xgb-ci.clang_tidy
- xgb-ci.cpu
- xgb-ci.gpu
- xgb-ci.gpu_build_r_rockylinux8
- xgb-ci.gpu_build_rockylinux8
- xgb-ci.gpu_build_rockylinux8_dev_ver
- xgb-ci.jvm
- xgb-ci.jvm_gpu_build
- xgb-ci.manylinux_2_28_x86_64
- xgb-ci.manylinux2014_x86_64
- xgb-ci.i386
runner: [linux-amd64-cpu]
include:
- container_id: xgb-ci.aarch64
runner: linux-arm64-cpu
- container_id: xgb-ci.manylinux2014_aarch64
runner: linux-arm64-cpu
steps:
- name: Workflow trigger information
run: |
echo "Triggered by repo ${{ inputs.upstream_repository }}, job ${{ inputs.upstream_job }}"
if: inputs.upstream_repository != '' && inputs.upstream_job != ''
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Build ${{ matrix.container_id }}
run: bash containers/docker_build.sh ${{ matrix.container_id }}