diff --git a/.github/workflows/_buildx.yml b/.github/workflows/_buildx.yml index d22dbac..9aef76a 100644 --- a/.github/workflows/_buildx.yml +++ b/.github/workflows/_buildx.yml @@ -11,7 +11,7 @@ on: required: false type: boolean disable_upload: - default: false + default: true required: false type: boolean diff --git a/.github/workflows/ffmpeg.yml b/.github/workflows/ffmpeg.yml deleted file mode 100644 index fd16e37..0000000 --- a/.github/workflows/ffmpeg.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: ffmpeg -on: - push: - branches: - - main - paths: - - '.github/workflows/_buildx.yml' - - '.github/workflows/ffmpeg.yml' - - 'deps/ffmpeg' - - 'patchs/ffmpeg/**' - - 'scripts/ffmpeg.sh' - - 'build.sh' - - 'env-apple.sh' - - 'pkg-conf.sh' - pull_request: - branches: - - main - paths: - - '.github/workflows/_buildx.yml' - - '.github/workflows/ffmpeg.yml' - - 'deps/ffmpeg' - - 'patchs/ffmpeg/**' - - 'scripts/ffmpeg.sh' - - 'build.sh' - - 'env-apple.sh' - - 'pkg-conf.sh' - -jobs: - build: - secrets: inherit - uses: ./.github/workflows/_buildx.yml - with: - disable_shared: false diff --git a/build.sh b/build.sh index c12e9eb..a9b3752 100755 --- a/build.sh +++ b/build.sh @@ -56,8 +56,12 @@ function compile() { export PKG_PLATFORM="${3}" export PKG_ARCH="${4}" - export PKG_BULD_DIR=${BULD_DIR:-"${PROJ_ROOT}/tmp/${PKG_NAME}/${PKG_PLATFORM}/${PKG_ARCH}"} - export PKG_INST_DIR=${INST_DIR:-"${PROJ_ROOT}/out/${PKG_NAME}/${PKG_PLATFORM}/${PKG_ARCH}"} + export PKG_BULD_DIR="${PROJ_ROOT}/tmp/${PKG_NAME}/${PKG_PLATFORM}/${PKG_ARCH}" + export PKG_INST_DIR="${PROJ_ROOT}/out/${PKG_NAME}/${PKG_PLATFORM}/${PKG_ARCH}" + if [ "${GITHUB_ACTIONS}" == "true" ]; then + if [ -n "${BULD_DIR}" ]; then { export PKG_BULD_DIR="${BULD_DIR}"; } fi + if [ -n "${INST_DIR}" ]; then { export PKG_INST_DIR="${BULD_DIR}"; } fi + fi if [ ! -e "${SUBPROJ_SRC}/.git" ]; then pushd -- "${PROJ_ROOT}" diff --git a/pkg-conf.sh b/pkg-conf.sh index 4a4aef4..ef7a330 100755 --- a/pkg-conf.sh +++ b/pkg-conf.sh @@ -9,9 +9,6 @@ fi if [ -z "${PROJ_ROOT}" ]; then PROJ_ROOT=$(cd "$(dirname ${BASH_SOURCE[0]})"; pwd) fi -if [ "${GITHUB_ACTIONS}" == "true" ]; then - pushd -- "${PROJ_ROOT}"; { git lfs fetch --all --prune; }; popd -fi export PKG_DEPS_PATH="${PROJ_ROOT}/lib" { rm -rf "${PKG_DEPS_PATH}"; mkdir -p "${PKG_DEPS_PATH}"; } @@ -27,12 +24,10 @@ function dl_pkgc() { fi printf "\e[1m\e[36m%s\e[0m\n" "dl_filename='${dl_filename}'" - pushd -- "${PROJ_ROOT}" + pushd -- "${PKG_DEPS_PATH}" { set -x - git archive --format=tar origin/packages ${pkg_name}/${pkg_version}/${dl_filename} \ - | tar -xvf - -C "${PKG_DEPS_PATH}" --strip-components=2 --no-same-owner - unzip -q "${PKG_DEPS_PATH}/${dl_filename}" -d "${PKG_DEPS_PATH}" + ln -sfn ../out/${pkg_name}/${PKG_PLATFORM}/${PKG_ARCH} ${pkg_name} set +x } popd