mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-02-11 11:47:07 +05:00
Compare commits
4 Commits
acff39477b
...
fc389e30c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc389e30c1 | ||
|
|
510a31e7ec | ||
|
|
8f6a81ecd2 | ||
|
|
68cb027109 |
81
.github/workflows/build.yml
vendored
81
.github/workflows/build.yml
vendored
@@ -53,7 +53,6 @@ env:
|
|||||||
REPO_LNK: openwrt-xiaomi/openwrt
|
REPO_LNK: openwrt-xiaomi/openwrt
|
||||||
REPO_BRANCH: xq-25.12
|
REPO_BRANCH: xq-25.12
|
||||||
TAG_PREFIX: v25-
|
TAG_PREFIX: v25-
|
||||||
DEPENDENCIES: ${{ github.workspace }}/dependencies-ubuntu.txt
|
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
DEVICE_NAME: unknown
|
DEVICE_NAME: unknown
|
||||||
BUILD_DATE: unknown
|
BUILD_DATE: unknown
|
||||||
@@ -185,9 +184,18 @@ jobs:
|
|||||||
remove-haskell: true
|
remove-haskell: true
|
||||||
remove-codeql: true
|
remove-codeql: true
|
||||||
remove-docker-images: true
|
remove-docker-images: true
|
||||||
|
|
||||||
|
- name: Set fixed workspace
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p /builder/openwrt /builder/tmp
|
||||||
|
sudo chown -R $USER:$USER /builder
|
||||||
|
echo "GITHUB_WORKSPACE=/builder/openwrt" >> $GITHUB_ENV
|
||||||
|
echo "RUNNER_TEMP=/builder/tmp" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout builder
|
- name: Checkout builder
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
|
with:
|
||||||
|
path: /builder/openwrt
|
||||||
|
|
||||||
- name: Download OpenWrt sources
|
- name: Download OpenWrt sources
|
||||||
run: |
|
run: |
|
||||||
@@ -223,11 +231,39 @@ jobs:
|
|||||||
if: github.event.inputs.use_cache == 'true'
|
if: github.event.inputs.use_cache == 'true'
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
key: host-tools-${{ hashFiles('tools/**') }}
|
||||||
path: |
|
path: |
|
||||||
staging_dir/host
|
staging_dir/host
|
||||||
build_dir/host
|
build_dir/host
|
||||||
|
|
||||||
|
- name: Fix time stamps into restored dirs
|
||||||
|
if: github.event.inputs.use_cache == 'true' && steps.tools_cache_restore.outputs.cache-hit == 'true'
|
||||||
|
run: |
|
||||||
|
touch staging_dir/host/.prepared
|
||||||
|
touch staging_dir/host/.prereq-build
|
||||||
|
touch staging_dir/host/stamp/.* 2>/dev/null
|
||||||
|
find build_dir/host -name ".prepared*" -exec touch {} +
|
||||||
|
find build_dir/host -name ".configured" -exec touch {} +
|
||||||
|
find build_dir/host -name ".built" -exec touch {} +
|
||||||
|
touch build_dir/stamp
|
||||||
|
|
||||||
|
- name: Inspect restored host tools
|
||||||
|
if: github.event.inputs.use_cache == 'true'
|
||||||
|
run: |
|
||||||
|
echo "====== openwrt-native.txt ======"
|
||||||
|
cat build_dir/host/pkgconf-*/openwrt-native.txt || true
|
||||||
|
echo "====== staging_dir/host ====="
|
||||||
|
du -sh staging_dir/host || true
|
||||||
|
ls -la staging_dir/host || true
|
||||||
|
echo "====== staging_dir/host/bin ====="
|
||||||
|
du -sh staging_dir/host/bin || true
|
||||||
|
ls -1 staging_dir/host/bin | head -20 || true
|
||||||
|
echo "====== build_dir/host ======="
|
||||||
|
du -sh build_dir/host || true
|
||||||
|
ls -1 build_dir/host | head -20 || true
|
||||||
|
echo "====== path info ========"
|
||||||
|
grep -R "/home/runner" build_dir/host | head
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
id: configure
|
id: configure
|
||||||
if: steps.update.outputs.status == 'success'
|
if: steps.update.outputs.status == 'success'
|
||||||
@@ -284,6 +320,17 @@ jobs:
|
|||||||
make -j$(nproc) download
|
make -j$(nproc) download
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Fix time stamps into restored dirs
|
||||||
|
if: github.event.inputs.use_cache == 'true' && steps.tools_cache_restore.outputs.cache-hit == 'true'
|
||||||
|
run: |
|
||||||
|
touch staging_dir/host/.prepared
|
||||||
|
touch staging_dir/host/.prereq-build
|
||||||
|
touch staging_dir/host/stamp/.* 2>/dev/null
|
||||||
|
find build_dir/host -name ".prepared*" -exec touch {} +
|
||||||
|
find build_dir/host -name ".configured" -exec touch {} +
|
||||||
|
find build_dir/host -name ".built" -exec touch {} +
|
||||||
|
touch build_dir/stamp
|
||||||
|
|
||||||
- name: Build tools and toolchain
|
- name: Build tools and toolchain
|
||||||
id: tools
|
id: tools
|
||||||
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
||||||
@@ -306,16 +353,28 @@ jobs:
|
|||||||
if: steps.tools.outputs.status == 'success' && github.event.inputs.use_cache != 'true'
|
if: steps.tools.outputs.status == 'success' && github.event.inputs.use_cache != 'true'
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
key: host-tools-${{ hashFiles('tools/**') }}
|
||||||
path: |
|
path: |
|
||||||
staging_dir/host
|
staging_dir/host
|
||||||
build_dir/host
|
build_dir/host
|
||||||
|
|
||||||
- name: Kernel compile and install
|
- name: Configure 2
|
||||||
id: kernel
|
id: configure2
|
||||||
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
if: steps.tools.outputs.status == 'success'
|
||||||
|
env:
|
||||||
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
make target/linux/install -j$(nproc)
|
make clean
|
||||||
|
./xmake.sh -I -t $TARGET
|
||||||
|
|
||||||
|
- name: Kernel compile
|
||||||
|
id: kernel
|
||||||
|
if: false # ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
||||||
|
run: |
|
||||||
|
make target/linux/compile -j$(npoc)
|
||||||
|
make target/linux/install -j$(npoc)
|
||||||
|
make target/linux/dtb -j$(npoc)
|
||||||
|
make target/linux/prereq
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Monitor memory 2
|
- name: Monitor memory 2
|
||||||
@@ -330,18 +389,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Build the firmware image
|
- name: Build the firmware image
|
||||||
id: compile
|
id: compile
|
||||||
if: steps.tools.outputs.status == 'success' && steps.kernel.outputs.status == 'success'
|
if: steps.tools.outputs.status == 'success'
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
echo "Run $(nproc) thread compile"
|
echo "Run $(nproc) thread compile"
|
||||||
if [ "$FAKE_BUILD" != "true" -a "$TEST_BUILD" = "true" -a "$PACKAGE_DIR" != "" ]; then
|
if [ "$FAKE_BUILD" != "true" -a "$TEST_BUILD" = "true" -a "$PACKAGE_DIR" != "" ]; then
|
||||||
|
make target/linux/compile -j$(npoc)
|
||||||
|
echo "=============== BUILD PACKAGE: $PACKAGE_DIR ==============="
|
||||||
make $PACKAGE_DIR/compile V=sc BUILD_LOG=1
|
make $PACKAGE_DIR/compile V=sc BUILD_LOG=1
|
||||||
exit 99
|
exit 99
|
||||||
fi
|
fi
|
||||||
if [ "$FAKE_BUILD" != "true" ]; then
|
if [ "$FAKE_BUILD" != "true" ]; then
|
||||||
if [ "$TEST_BUILD" != "true" ]; then
|
if [ "$TEST_BUILD" != "true" ]; then
|
||||||
make -j$(nproc) world
|
make -j$(nproc) download world
|
||||||
else
|
else
|
||||||
make V=sc world
|
make V=sc world
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user