Skip to content

Commit c370478

Browse files
committed
fix workflow10
1 parent afe2875 commit c370478

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,20 @@ jobs:
108108
run: |
109109
brew install create-dmg tree coreutils
110110
111+
- name: Cache Chromium toolchain
112+
if: startsWith(matrix.job.target,'linux')
113+
id: cache-chromium-toolchain
114+
uses: actions/cache@v4
115+
with:
116+
path: |
117+
./cronet-go/naiveproxy/src/third_party/llvm-build/Release+Asserts
118+
./cronet-go/naiveproxy/src/out/sysroot-build
119+
key: chromium-toolchain-${{ matrix.job.target }}-${{ matrix.job.arch }}-${{ matrix.job.variant }}-${{ hashFiles('hiddify-sing-box/.github/CRONET_GO_VERSION') }}
111120
- name: install_cronet
112121
if: startsWith(matrix.job.target,'linux')
113122
run: |
114123
make cronet-${{ matrix.job.arch }}
115-
env:
116-
GOOS: ${{ matrix.os }}
117-
GOARCH: ${{ matrix.arch }}
118-
GO386: ${{ matrix.go386 }}
119-
GOARM: ${{ matrix.goarm }}
120-
GOMIPS: ${{ matrix.gomips }}
121-
GOMIPS64: ${{ matrix.gomips }}
124+
122125
- name: Build
123126
run: |
124127
make ${{ matrix.job.target }}

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,11 @@ build-linux: prepare
138138
mkdir lib
139139
cp $(BINDIR)/lib/$(LIBNAME).so ./lib/$(LIBNAME).so
140140

141-
GOOS=linux GOARCH=$(ARCH) CGO_LDFLAGS="./lib/$(LIBNAME).so -Wl,-rpath,\$$ORIGIN/lib -fuse-ld=lld" \
142-
$(GOBUILDSRV) -o $(BINDIR)/$(CLINAME) ./cmd/bydll
141+
GOOS=linux GOARCH=$(ARCH) CGO_LDFLAGS="./lib/$(LIBNAME).so -Wl,-rpath,\$$ORIGIN/lib -fuse-ld=lld" $(GOBUILDSRV) -o $(BINDIR)/$(CLINAME) ./cmd/bydll
143142

144143
rm -rf ./lib/*.so
145144
chmod +x $(BINDIR)/$(CLINAME)
146-
if [ ! -f $(BINDIR)/$(LIBNAME).so -o ! -f $(BINDIR)/$(CLINAME) ]; then \
145+
if [ ! -f $(BINDIR)/lib/$(LIBNAME).so -o ! -f $(BINDIR)/$(CLINAME) ]; then \
147146
echo "Error: $(LIBNAME).so or $(CLINAME) not built"; \
148147
ls -R $(BINDIR); \
149148
exit 1; \

0 commit comments

Comments
 (0)