Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tofuliang committed Sep 19, 2024
1 parent 21d64b4 commit 9839dd1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 56 deletions.
82 changes: 40 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build Binary

on:
workflow_dispatch:
push:
branches:
- build
Expand All @@ -13,9 +14,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14]
os: [macos-14, macos-13]
# arch: [amd64, arm64]
arch: [amd64, arm64, ppc64le, s390x, 386, arm]
arch: [amd64, arm64]
steps:
- name: Check Out Branch
uses: actions/checkout@master
Expand All @@ -34,21 +35,18 @@ jobs:
docker buildx use multibulider
docker buildx build --build-arg HOST=${HOST} --platform linux/${arch} -t aria2 .
- name: macOS Build
if: ${{ runner.os == 'macOS' }}
if: ${{ (matrix.os == 'macos-13' && matrix.arch == 'amd64') || (matrix.os == 'macos-14' && matrix.arch == 'arm64') }}
run: |
brew install cppunit autoconf automake pkg-config libtool
brew unlink gettext || true
git checkout build
cd /Users/runner/work/aria2
mkdir build
cd build
ln -s ../aria2/makerelease-osx-static.mk ./Makefile
make ARCH=arm64 V=s
strip /Users/runner/work/aria2s/build/aria2-def/aria2c
(cd /Users/runner/work/aria2;mkdir build;cd build; ln -s ../aria2/makerelease-osx-static.mk ./Makefile; make ARCH=${{ matrix.arch == 'amd64' && 'x86_64' || matrix.arch }} V=s)
strip /Users/runner/work/aria2/build/aria2-def/bin/aria2c
mkdir ./artifact/
mv /Users/runner/work/aria2s/build/aria2-def/aria2c ./aria2c
tar cf ./artifact/aria2c-macos-amd64.tar aria2c
mv /Users/runner/work/aria2/build/aria2-def/bin/aria2c ./aria2c
tar cf ./artifact/aria2c-macos-${{ matrix.arch }}.tar aria2c
- name: upload macOS aria2c
if: ${{ runner.os == 'macOS'}}
if: ${{ (matrix.os == 'macos-13' && matrix.arch == 'amd64') || (matrix.os == 'macos-14' && matrix.arch == 'arm64') }}
uses: actions/upload-artifact@master
with:
name: aria2c-macos-${{ matrix.arch }}
Expand All @@ -75,36 +73,36 @@ jobs:
with:
name: aria2c-macos-arm64
path: ./artifact
- name: Retrieve aria2c-linux-amd64
uses: actions/download-artifact@master
with:
name: aria2c-linux-amd64
path: ./artifact
- name: Retrieve aria2c-linux-arm64
uses: actions/download-artifact@master
with:
name: aria2c-linux-arm64
path: ./artifact
- name: Retrieve aria2c-linux-ppc64le
uses: actions/download-artifact@master
with:
name: aria2c-linux-ppc64le
path: ./artifact
- name: Retrieve aria2c-linux-s390x
uses: actions/download-artifact@master
with:
name: aria2c-linux-s390x
path: ./artifact
- name: Retrieve aria2c-linux-386
uses: actions/download-artifact@master
with:
name: aria2c-linux-386
path: ./artifact
- name: Retrieve aria2c-linux-arm
uses: actions/download-artifact@master
with:
name: aria2c-linux-arm
path: ./artifact
# - name: Retrieve aria2c-linux-amd64
# uses: actions/download-artifact@master
# with:
# name: aria2c-linux-amd64
# path: ./artifact
# - name: Retrieve aria2c-linux-arm64
# uses: actions/download-artifact@master
# with:
# name: aria2c-linux-arm64
# path: ./artifact
# - name: Retrieve aria2c-linux-ppc64le
# uses: actions/download-artifact@master
# with:
# name: aria2c-linux-ppc64le
# path: ./artifact
# - name: Retrieve aria2c-linux-s390x
# uses: actions/download-artifact@master
# with:
# name: aria2c-linux-s390x
# path: ./artifact
# - name: Retrieve aria2c-linux-386
# uses: actions/download-artifact@master
# with:
# name: aria2c-linux-386
# path: ./artifact
# - name: Retrieve aria2c-linux-arm
# uses: actions/download-artifact@master
# with:
# name: aria2c-linux-arm
# path: ./artifact
# - name: SSH 连接到 Actions
# uses: P3TERX/ssh2actions@main
# env:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: DEBUG

on:
workflow_dispatch:
inputs:

jobs:
build:
Expand Down
27 changes: 14 additions & 13 deletions makerelease-osx-static.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# - openssl
# - libuv
# - c-ares (asynchronous DNS resolver)
# - expat (XML parser, for metalinks)
# - libxml2 (XML parser, for metalinks)
# - gmp (multi-precision arithmetric library, for DHKeyExchange, BitTorrent)
# - sqlite3 (self-contained SQL database, for Firefox3 cookie reading)
# - cppunit (unit tests for C++, framework in use by aria2 `make check`)
Expand Down Expand Up @@ -100,15 +100,16 @@ zlib_version = 1.3.1
zlib_hash = 38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32
zlib_url = https://zlib.net/zlib-$(zlib_version).tar.xz

openssl_version = 3.3.2
openssl_hash = 2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281
openssl_url = https://github.com/openssl/openssl/releases/download/openssl-$(openssl_version)/openssl-$(openssl_version).tar.gz
openssl_version = 1.1.1w
openssl_hash = cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8
openssl_url = https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz

expat_version = 2.6.3
expat_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc
expat_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz
expat_cflags=$(CFLAGS) $(LTO_FLAGS)
expat_ldflags=$(CFLAGS) $(LTO_FLAGS)
libxml2_version = 2.13.4
libxml2_hash = 65d042e1c8010243e617efb02afda20b85c2160acdbfbcb5b26b80cec6515650
libxml2_url = https://download.gnome.org/sources/libxml2/2.13/libxml2-$(libxml2_version).tar.xz
libxml2_cflags=$(CFLAGS) $(LTO_FLAGS)
libxml2_ldflags=$(CFLAGS) $(LTO_FLAGS)
libxml2_nocheck = yes

cares_version = 1.33.1
cares_hash = 06869824094745872fa26efd4c48e622b9bd82a89ef0ce693dc682a23604f415
Expand Down Expand Up @@ -146,7 +147,7 @@ libssh2_nocheck = yes


# ARCHLIBS that can be template build
ARCHLIBS = expat cares sqlite gmp libssh2
ARCHLIBS = libxml2 cares sqlite gmp libssh2
# NONARCHLIBS that cannot be template build
NONARCHLIBS = libuv zlib openssl

Expand All @@ -155,7 +156,7 @@ NONARCHLIBS = libuv zlib openssl
ARIA2 := aria2-$(VERSION)
ARIA2_PREFIX := $(PWD)/$(ARIA2)
ARIA2_CONFFLAGS = \
--without-libxml2 \
--wit-libxml2 \
--without-appletls \
--without-gnutls \
--with-openssl \
Expand Down Expand Up @@ -281,12 +282,12 @@ endef
$(foreach lib,$(ARCHLIBS),$(eval $(call ARCH_template,$(lib))))

.PRECIOUS: aria2.%.build
aria2.%.build: libuv.%.build zlib.%.build openssl.%.build expat.%.build gmp.%.build cares.%.build sqlite.%.build libssh2.%.build
aria2.%.build: libuv.%.build zlib.%.build openssl.%.build libxml2.%.build gmp.%.build cares.%.build sqlite.%.build libssh2.%.build
$(eval DEST := $$(basename $$@))
$(eval ARCH := $$(subst .,,$$(suffix $$(DEST))))
mkdir -p $(DEST)
rsync -a $(SRCDIR)/../aria2/ $(DEST)
# find $(PWD)/arch/lib -name "*.dylib" -delete
find $(PWD)/arch/lib -name "*.dylib" -delete
( cd $(DEST) && autoreconf -i && ./configure \
--prefix=$(ARIA2_PREFIX) \
--bindir=$(PWD)/$(DEST) \
Expand Down

0 comments on commit 9839dd1

Please sign in to comment.