Repository navigation
91 lines (86 loc) · 2.6 KB
/
Copy pathlinux-environment.yml
File metadata and controls
91 lines (86 loc) · 2.6 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
name: Linux 环境缓存预热
on:
push:
branches:
- main
paths:
- '.github/actions/linux-environment/**'
- '.github/docker/**'
- '.github/.dockerignore'
- '.github/scripts/build-linux-deps.sh'
- '.github/scripts/linux-deps.env'
- '.github/scripts/prepare-linux-test.sh'
- '.github/scripts/setup-gcc15.sh'
- '.github/workflows/build-test.yml'
- '.github/workflows/linux-environment.yml'
schedule:
- cron: '17 3 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: linux-environment-${{ github.ref }}
cancel-in-progress: false
jobs:
configuration:
name: 确定环境刷新周期
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-26.04
timeout-minutes: 5
outputs:
refresh: ${{ steps.environment.outputs.refresh }}
steps:
# 全部环境使用同一个 UTC ISO 周,避免排队跨周时出现不同刷新参数。
- id: environment
run: echo "refresh=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT"
environment:
name: 缓存 / ${{ matrix.name }}
needs: configuration
runs-on: ubuntu-26.04
timeout-minutes: 60
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- kind: build
name: linux-build
base-image: quay.io/pypa/manylinux_2_28_x86_64
install-qemu: '0'
- kind: test
name: ubuntu-22.04
base-image: ubuntu:22.04
install-qemu: '1'
- kind: test
name: ubuntu-24.04
base-image: ubuntu:24.04
install-qemu: '0'
- kind: test
name: debian-12
base-image: debian:12
install-qemu: '0'
- kind: test
name: debian-13
base-image: debian:13
install-qemu: '0'
- kind: test
name: almalinux-9
base-image: almalinux:9
install-qemu: '0'
- kind: test
name: archlinux-base
base-image: archlinux:base
install-qemu: '0'
steps:
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
- name: 准备并保存环境缓存
uses: ./.github/actions/linux-environment
with:
kind: ${{ matrix.kind }}
name: ${{ matrix.name }}
base-image: ${{ matrix.base-image }}
install-qemu: ${{ matrix.install-qemu }}
refresh: ${{ needs.configuration.outputs.refresh }}
load: 'false'
cache-required: 'true'