mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-02-02 23:47:48 +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_BRANCH: xq-25.12
|
||||
TAG_PREFIX: v25-
|
||||
DEPENDENCIES: ${{ github.workspace }}/dependencies-ubuntu.txt
|
||||
TZ: UTC
|
||||
DEVICE_NAME: unknown
|
||||
BUILD_DATE: unknown
|
||||
@@ -185,9 +184,18 @@ jobs:
|
||||
remove-haskell: true
|
||||
remove-codeql: 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
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
path: /builder/openwrt
|
||||
|
||||
- name: Download OpenWrt sources
|
||||
run: |
|
||||
@@ -223,11 +231,39 @@ jobs:
|
||||
if: github.event.inputs.use_cache == 'true'
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
||||
key: host-tools-${{ hashFiles('tools/**') }}
|
||||
path: |
|
||||
staging_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
|
||||
id: configure
|
||||
if: steps.update.outputs.status == 'success'
|
||||
@@ -284,6 +320,17 @@ jobs:
|
||||
make -j$(nproc) download
|
||||
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
|
||||
id: tools
|
||||
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'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
||||
key: host-tools-${{ hashFiles('tools/**') }}
|
||||
path: |
|
||||
staging_dir/host
|
||||
build_dir/host
|
||||
|
||||
- name: Kernel compile and install
|
||||
id: kernel
|
||||
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
||||
- name: Configure 2
|
||||
id: configure2
|
||||
if: steps.tools.outputs.status == 'success'
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
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
|
||||
|
||||
- name: Monitor memory 2
|
||||
@@ -330,18 +389,20 @@ jobs:
|
||||
|
||||
- name: Build the firmware image
|
||||
id: compile
|
||||
if: steps.tools.outputs.status == 'success' && steps.kernel.outputs.status == 'success'
|
||||
if: steps.tools.outputs.status == 'success'
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
run: |
|
||||
echo "Run $(nproc) thread compile"
|
||||
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
|
||||
exit 99
|
||||
fi
|
||||
if [ "$FAKE_BUILD" != "true" ]; then
|
||||
if [ "$TEST_BUILD" != "true" ]; then
|
||||
make -j$(nproc) world
|
||||
make -j$(nproc) download world
|
||||
else
|
||||
make V=sc world
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user