-
Notifications
You must be signed in to change notification settings - Fork 1
158 lines (140 loc) · 5.1 KB
/
build_curl_http3.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: curl build with http3 support
on:
workflow_dispatch:
# push:
# branches:
# - main
jobs:
buildCurlhttp3:
name: Build curl with http3
# if: "contains(github.event.head_commit.message, '[curlBuild]')"
continue-on-error: false
strategy:
matrix:
target:
- id: 'linux-amd64'
os: 'ubuntu-latest'
# tar_extra_args: ''
# llvm_version: '18.x'
# - id: 'linux-aarch64'
# os: "ubuntu-latest"
# os: ['self-hosted', 'linux', 'ARM64']
# - id: 'linux-riscv64'
# os: "ubuntu-latest"
# os: ['self-hosted', 'linux', 'RISCV64']
## https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
- id: 'darwin-amd64'
# os: 'macos-14-xlarge' ## failed
os: 'macos-latest'
## https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners#about-macos-larger-runners
# tar_extra_args: ''
# llvm_version: '18.x'
# - id: 'windows-amd64'
# os: 'windows-2022'
# llvm_version: '16.x'
# When unpacking an archive on Windows, the symlinks can't be
# created unless the target path already exists. This causes
# problems when the linked file is ordered after the link
# inside the archive. Dereferencing the files when packing them
# adds an additional copy per link, but it reliably works and
# the additional size is not too large on Windows.
# tar_extra_args: '--dereference'
# llvm_version: ['17.x']
# llvm_repo_url: ['https://github.com/llvm/llvm-project.git']
fail-fast: true
runs-on: ${{ matrix.target.os }}
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
fetch-depth: 2
# - name: Check out fmt code base
# uses: actions/checkout@v4
# with:
# fetch-depth: 2
# repository: fmtlib/fmt
# ref: 9.1.0
# path: fmt
# fetch-tags: true
- name: Install `deps` on Ubuntu
if: startsWith(matrix.target.id, 'linux-')
shell: bash
run: |
sudo apt install ninja-build build-essential autoconf automake tree clang cmake coreutils libidn2-0-dev pkg-config -y
echo "cpu core num is "
nproc
- name: Install `ninja llvm cmake ` on macOS
if: startsWith(matrix.target.id, 'darwin-')
shell: bash
run: |
brew install ninja llvm cmake tree libunistring libidn2 pkg-config autoconf automake libtool
clang --version
echo "BREW_INSTALL_PREFIX=$(brew --prefix llvm)" >> $GITHUB_ENV
echo "${BREW_INSTALL_PREFIX}/bin"
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
clang --version
echo "llvm"
/opt/homebrew/opt/llvm/bin/clang --version
- name: test deps
if: startsWith(matrix.target.id, 'darwin-') || startsWith(matrix.target.id, 'linux-')
shell: bash
run: |
uname -a
clang --version
clang++ --version
- name: build curl with http3 support
shell: bash
run: |
bash scripts/build_curl_http3.sh
- name: show layouts
shell: bash
run: |
tree -L 2
ls -al
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target.id }}-${{ matrix.target.os }}-prebuilt
path: dist
if-no-files-found: error
retention-days: 7
buildCurlHttp3Openwrt:
runs-on: ubuntu-latest
# if: "contains(github.event.head_commit.message, '[curlBuild]')"
container:
# image: docker://haldir65/hello-docker-hub:openwrt-toolchians-19.07.1
image: ghcr.io/haldir65/upgraded-train:openwrt-19.07.1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install `related deps` on Ubuntu
shell: bash
run: |
sudo apt install ninja-build build-essential autoconf automake libtool coreutils tree libidn2-0-dev pkg-config -y
echo "cpu core num is "
echo "cpu core num is "
echo "${STAGING_DIR}"
echo "${PATH}"
nproc
- name: show compiler layouts
shell: bash
run: |
tree ${STAGING_DIR} -L 3
- name: build curl static binary
shell: bash
run: |
tree -L 2
chmod +x scripts/build_curl_http3_openwrt.sh
bash scripts/build_curl_http3_openwrt.sh
- name: show binary info
shell: bash
run: |
tree prebuilt -L 2
ls -al
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: openwrt-prebuilt-curl-with-http3
path: dist
if-no-files-found: error
retention-days: 7