Skip to content

Commit c3f00a2

Browse files
authored
Use Aliyun APT mirror for Ubuntu in GitHub Actions workflow (#2169)
1 parent a1a7ff4 commit c3f00a2

File tree

5 files changed

+118
-30
lines changed

5 files changed

+118
-30
lines changed

Diff for: .github/workflows/build-core-ut.yaml

+19-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,25 @@ jobs:
4141
fail-fast: true
4242
steps:
4343
- name: prepare ubuntu environment
44-
run: sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
44+
run: |
45+
sudo bash -c 'cat > /etc/apt/sources.list << EOL
46+
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
47+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
48+
49+
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
50+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
51+
52+
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
53+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
54+
55+
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
56+
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
57+
58+
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
59+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
60+
EOL'
61+
sudo apt update
62+
sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
4563
# Clean up space to prevent action from running out of disk space.
4664
- name: Free disk space
4765
run: |

Diff for: .github/workflows/build-core.yaml

+19-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,25 @@ jobs:
4141
fail-fast: true
4242
steps:
4343
- name: prepare ubuntu environment
44-
run: sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
44+
run: |
45+
sudo bash -c 'cat > /etc/apt/sources.list << EOL
46+
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
47+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
48+
49+
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
50+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
51+
52+
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
53+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
54+
55+
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
56+
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
57+
58+
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
59+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
60+
EOL'
61+
sudo apt update
62+
sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
4563
# Clean up space to prevent action from running out of disk space.
4664
- name: Free disk space
4765
run: |

Diff for: .github/workflows/build-pure-plugin.yaml

+30-13
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ name: Build Pure Plugin
1717
on:
1818
pull_request:
1919
paths-ignore:
20-
- 'docs/**'
21-
- 'example_config/**'
22-
- 'docker/**'
23-
- 'k8s_template/**'
24-
- 'changes/**'
25-
- 'licenses/**'
26-
- 'CHANGELOG.md'
20+
- "docs/**"
21+
- "example_config/**"
22+
- "docker/**"
23+
- "k8s_template/**"
24+
- "changes/**"
25+
- "licenses/**"
26+
- "CHANGELOG.md"
2727
push:
2828
branches:
2929
- main
@@ -34,17 +34,34 @@ jobs:
3434
timeout-minutes: 60
3535
strategy:
3636
matrix:
37-
go-version: [ 1.19 ]
37+
go-version: [1.19]
3838
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on
39-
runner: [ arc-runner-set-ilogtail ]
39+
runner: [arc-runner-set-ilogtail]
4040
fail-fast: true
4141
steps:
42-
4342
# prepare ubuntu environment
4443
- name: prepare ubuntu environment
4544
if: matrix.runner == 'arc-runner-set-ilogtail'
46-
run: sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
47-
45+
run: |
46+
sudo bash -c 'cat > /etc/apt/sources.list << EOL
47+
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
48+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
49+
50+
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
51+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
52+
53+
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
54+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
55+
56+
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
57+
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
58+
59+
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
60+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
61+
EOL'
62+
sudo apt update
63+
sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
64+
4865
# Clean up space to prevent action from running out of disk space.
4966
- name: Free disk space
5067
if: matrix.runner == 'arc-runner-set-ilogtail'
@@ -84,7 +101,7 @@ jobs:
84101
result:
85102
runs-on: arc-runner-set-ilogtail
86103
timeout-minutes: 60
87-
needs: [ CI ]
104+
needs: [CI]
88105
steps:
89106
- name: Build Result
90107
run: echo "Just to make the GitHub merge button green"

Diff for: .github/workflows/build.yaml

+19-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,25 @@ jobs:
4141
fail-fast: true
4242
steps:
4343
- name: prepare ubuntu environment
44-
run: sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
44+
run: |
45+
sudo bash -c 'cat > /etc/apt/sources.list << EOL
46+
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
47+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
48+
49+
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
50+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
51+
52+
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
53+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
54+
55+
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
56+
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
57+
58+
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
59+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
60+
EOL'
61+
sudo apt update
62+
sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev build-essential git curl bc
4563
# Clean up space to prevent action from running out of disk space.
4664
- name: Free disk space
4765
run: |

Diff for: .github/workflows/static-check.yaml

+31-14
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ name: Static Check
1717
on:
1818
pull_request:
1919
paths-ignore:
20-
- 'docs/**'
21-
- 'example_config/**'
22-
- 'docker/**'
23-
- 'k8s_template/**'
24-
- 'changes/**'
25-
- 'licenses/**'
26-
- 'CHANGELOG.md'
20+
- "docs/**"
21+
- "example_config/**"
22+
- "docker/**"
23+
- "k8s_template/**"
24+
- "changes/**"
25+
- "licenses/**"
26+
- "CHANGELOG.md"
2727
push:
2828
branches:
2929
- main
@@ -37,14 +37,32 @@ jobs:
3737
timeout-minutes: 60
3838
strategy:
3939
matrix:
40-
go-version: [ 1.19 ]
41-
runner: [ ubuntu ]
40+
go-version: [1.19]
41+
runner: [ubuntu]
4242
fail-fast: true
4343
steps:
4444
# prepare ubuntu environment
4545
- name: prepare ubuntu environment
4646
if: matrix.runner == 'ubuntu'
47-
run: sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev
47+
run: |
48+
sudo bash -c 'cat > /etc/apt/sources.list << EOL
49+
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
50+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
51+
52+
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
53+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
54+
55+
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
56+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
57+
58+
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
59+
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
60+
61+
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
62+
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
63+
EOL'
64+
sudo apt update
65+
sudo apt-get clean && sudo apt-get update && sudo apt-get install -y libsystemd-dev
4866
4967
# Clean up space to prevent action from running out of disk space.
5068
- name: Free disk space
@@ -86,8 +104,8 @@ jobs:
86104
- name: C++ Core Lint
87105
uses: jidicula/[email protected]
88106
with:
89-
clang-format-version: '18'
90-
check-path: 'core'
107+
clang-format-version: "18"
108+
check-path: "core"
91109
exclude-regex: 'common/xxhash|labels/Relabel\.cpp|ProcessorParseContainerLogNative\.cpp|FlusherSLS\.cpp'
92110
include-regex: '.*\.(cpp|h)$'
93111

@@ -100,11 +118,10 @@ jobs:
100118
- name: UnitTest PluginManager
101119
run: sudo make unittest_pluginmanager
102120

103-
104121
result:
105122
runs-on: ubuntu-latest
106123
timeout-minutes: 60
107-
needs: [ CI ]
124+
needs: [CI]
108125
steps:
109126
- name: Build Result
110127
run: echo "Just to make the GitHub merge button green"

0 commit comments

Comments
 (0)