修改脚本解决网络问题
Some checks are pending
backend / cross (armhf) (push) Waiting to run
backend / cross (aarch64) (push) Waiting to run
backend / cross (arm) (push) Waiting to run
backend / cross (i686) (push) Waiting to run
backend / cross (mips) (push) Waiting to run
backend / cross (mips64) (push) Waiting to run
backend / cross (mips64el) (push) Waiting to run
backend / cross (mipsel) (push) Waiting to run
backend / cross (s390x) (push) Waiting to run
backend / cross (win32) (push) Waiting to run
backend / cross (x86_64) (push) Waiting to run
frontend / build (push) Waiting to run
backend / cross (aarch64) (pull_request) Waiting to run
backend / cross (arm) (pull_request) Waiting to run
backend / cross (armhf) (pull_request) Waiting to run
backend / cross (i686) (pull_request) Waiting to run
backend / cross (mips) (pull_request) Waiting to run
backend / cross (mips64) (pull_request) Waiting to run
backend / cross (mips64el) (pull_request) Waiting to run
backend / cross (mipsel) (pull_request) Waiting to run
backend / cross (s390x) (pull_request) Waiting to run
backend / cross (win32) (pull_request) Waiting to run
backend / cross (x86_64) (pull_request) Waiting to run
frontend / build (pull_request) Waiting to run
Some checks are pending
backend / cross (armhf) (push) Waiting to run
backend / cross (aarch64) (push) Waiting to run
backend / cross (arm) (push) Waiting to run
backend / cross (i686) (push) Waiting to run
backend / cross (mips) (push) Waiting to run
backend / cross (mips64) (push) Waiting to run
backend / cross (mips64el) (push) Waiting to run
backend / cross (mipsel) (push) Waiting to run
backend / cross (s390x) (push) Waiting to run
backend / cross (win32) (push) Waiting to run
backend / cross (x86_64) (push) Waiting to run
frontend / build (push) Waiting to run
backend / cross (aarch64) (pull_request) Waiting to run
backend / cross (arm) (pull_request) Waiting to run
backend / cross (armhf) (pull_request) Waiting to run
backend / cross (i686) (pull_request) Waiting to run
backend / cross (mips) (pull_request) Waiting to run
backend / cross (mips64) (pull_request) Waiting to run
backend / cross (mips64el) (pull_request) Waiting to run
backend / cross (mipsel) (pull_request) Waiting to run
backend / cross (s390x) (pull_request) Waiting to run
backend / cross (win32) (pull_request) Waiting to run
backend / cross (x86_64) (pull_request) Waiting to run
frontend / build (pull_request) Waiting to run
This commit is contained in:
7
.github/workflows/backend.yml
vendored
7
.github/workflows/backend.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
matrix:
|
||||
target: [i686, x86_64, arm, armhf, aarch64, mips, mipsel, mips64, mips64el, s390x, win32]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://devstar.cn/actions/checkout@v4
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -32,8 +32,3 @@ jobs:
|
||||
env:
|
||||
BUILD_TARGET: ${{ matrix.target }}
|
||||
run: ./scripts/cross-build.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ttyd.${{ matrix.target }}
|
||||
path: build/ttyd*
|
||||
|
||||
|
||||
26
.github/workflows/docker.yml
vendored
26
.github/workflows/docker.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://devstar.cn/actions/checkout@v4
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -25,32 +25,36 @@ jobs:
|
||||
[ "$arch" = "armv7" ] && arch="arm"
|
||||
mkdir -p dist/$arch && cp build/ttyd dist/$arch/ttyd
|
||||
done
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
- uses: https://devstar.cn/alexios/setup-qemu-action@v3
|
||||
- uses: https://devstar.cn/alexios/setup-buildx-action@v3
|
||||
- uses: https://devstar.cn/alexios/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
- uses: docker/login-action@v3
|
||||
- uses: https://devstar.cn/alexios/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Determine docker tags
|
||||
id: docker_tag
|
||||
env:
|
||||
DOCKER_USER: ${{ vars.DOCKER_HUB_USERNAME }}
|
||||
PROJECT: ${{ vars.PROJECT_NAME }}
|
||||
run: |
|
||||
FULL_IMAGE_NAME="${DOCKER_USER}/${PROJECT}"
|
||||
case $GITHUB_REF in
|
||||
refs/tags/*)
|
||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||
echo "DOCKER_TAG=tsl0922/ttyd:${TAG_NAME}" >> $GITHUB_ENV
|
||||
echo "ALPINE_TAG=tsl0922/ttyd:${TAG_NAME}-alpine" >> $GITHUB_ENV
|
||||
echo "DOCKER_TAG=${FULL_IMAGE_NAME}:${TAG_NAME}" >> $GITHUB_ENV
|
||||
echo "ALPINE_TAG=${FULL_IMAGE_NAME}:${TAG_NAME}-alpine" >> $GITHUB_ENV
|
||||
;;
|
||||
*)
|
||||
echo "DOCKER_TAG=tsl0922/ttyd:latest" >> $GITHUB_ENV
|
||||
echo "ALPINE_TAG=tsl0922/ttyd:alpine" >> $GITHUB_ENV
|
||||
echo "DOCKER_TAG=${FULL_IMAGE_NAME}:latest" >> $GITHUB_ENV
|
||||
echo "ALPINE_TAG=${FULL_IMAGE_NAME}:alpine" >> $GITHUB_ENV
|
||||
esac
|
||||
- name: build/push docker image
|
||||
uses: docker/build-push-action@v6
|
||||
uses: https://devstar.cn/alexios/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
@@ -60,7 +64,7 @@ jobs:
|
||||
${{ env.DOCKER_TAG }}
|
||||
ghcr.io/${{ env.DOCKER_TAG }}
|
||||
- name: build/push docker image (alpine)
|
||||
uses: docker/build-push-action@v6
|
||||
uses: https://devstar.cn/alexios/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.alpine
|
||||
|
||||
7
.github/workflows/frontend.yml
vendored
7
.github/workflows/frontend.yml
vendored
@@ -14,15 +14,16 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: https://devstar.cn/actions/checkout@v4
|
||||
- uses: https://devstar.cn/actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Run yarn install, check and build
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare yarn@stable --activate
|
||||
yarn install
|
||||
yarn install --no-immutable
|
||||
yarn add -D eslint-plugin-n
|
||||
yarn run check
|
||||
yarn run build
|
||||
working-directory: html
|
||||
|
||||
@@ -18,7 +18,7 @@ LIBWEBSOCKETS_VERSION="${LIBWEBSOCKETS_VERSION:-4.3.3}"
|
||||
|
||||
build_zlib() {
|
||||
echo "=== Building zlib-${ZLIB_VERSION} (${TARGET})..."
|
||||
curl -fSsLo- "https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
curl -fSsLo- "https://devstar.cn/alexios/build-deps/releases/download/v1.0/zlib-${ZLIB_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}"/zlib-"${ZLIB_VERSION}"
|
||||
env CHOST="${TARGET}" ./configure --static --archs="-fPIC" --prefix="${STAGE_DIR}"
|
||||
make -j"$(nproc)" install
|
||||
@@ -27,7 +27,7 @@ build_zlib() {
|
||||
|
||||
build_json-c() {
|
||||
echo "=== Building json-c-${JSON_C_VERSION} (${TARGET})..."
|
||||
curl -fSsLo- "https://s3.amazonaws.com/json-c_releases/releases/json-c-${JSON_C_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
curl -fSsLo- "https://devstar.cn/alexios/build-deps/releases/download/v1.0/json-c-${JSON_C_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}/json-c-${JSON_C_VERSION}"
|
||||
rm -rf build && mkdir -p build && cd build
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="${BUILD_DIR}/cross-${TARGET}.cmake" \
|
||||
@@ -43,7 +43,7 @@ build_json-c() {
|
||||
|
||||
build_mbedtls() {
|
||||
echo "=== Building mbedtls-${MBEDTLS_VERSION} (${TARGET})..."
|
||||
curl -fSsLo- "https://github.com/ARMmbed/mbedtls/archive/v${MBEDTLS_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
curl -fSsLo- "https://devstar.cn/alexios/build-deps/releases/download/v1.0/mbedtls-${MBEDTLS_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}/mbedtls-${MBEDTLS_VERSION}"
|
||||
rm -rf build && mkdir -p build && cd build
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="${BUILD_DIR}/cross-${TARGET}.cmake" \
|
||||
@@ -57,7 +57,7 @@ build_mbedtls() {
|
||||
|
||||
build_libuv() {
|
||||
echo "=== Building libuv-${LIBUV_VERSION} (${TARGET})..."
|
||||
curl -fSsLo- "https://dist.libuv.org/dist/v${LIBUV_VERSION}/libuv-v${LIBUV_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
curl -fSsLo- "https://devstar.cn/alexios/build-deps/releases/download/v1.0/libuv-v${LIBUV_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}/libuv-v${LIBUV_VERSION}"
|
||||
./autogen.sh
|
||||
env CFLAGS=-fPIC ./configure --disable-shared --enable-static --prefix="${STAGE_DIR}" --host="${TARGET}"
|
||||
@@ -83,7 +83,7 @@ EOF
|
||||
|
||||
build_libwebsockets() {
|
||||
echo "=== Building libwebsockets-${LIBWEBSOCKETS_VERSION} (${TARGET})..."
|
||||
curl -fSsLo- "https://github.com/warmcat/libwebsockets/archive/v${LIBWEBSOCKETS_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
curl -fSsLo- "https://devstar.cn/alexios/build-deps/releases/download/v1.0/libwebsockets-${LIBWEBSOCKETS_VERSION}.tar.gz" | tar xz -C "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}/libwebsockets-${LIBWEBSOCKETS_VERSION}"
|
||||
sed -i 's/ websockets_shared//g' cmake/libwebsockets-config.cmake.in
|
||||
sed -i 's/ OR PC_OPENSSL_FOUND//g' lib/tls/CMakeLists.txt
|
||||
@@ -134,7 +134,7 @@ build() {
|
||||
ALIAS="$2"
|
||||
STAGE_DIR="${STAGE_ROOT}/${TARGET}"
|
||||
BUILD_DIR="${BUILD_ROOT}/${TARGET}"
|
||||
MUSL_CC_URL="https://github.com/tsl0922/musl-toolchains/releases/download/2021-11-23"
|
||||
MUSL_CC_URL="https://devstar.cn/alexios/build-deps/releases/download/v1.0"
|
||||
COMPONENTS="1"
|
||||
SYSTEM="Linux"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user