Update build-kernel.yml

This commit is contained in:
Igor Pečovnik
2021-12-21 11:22:00 +01:00
committed by GitHub
parent 26cb7a56f9
commit 87496ccb4f

View File

@@ -145,6 +145,17 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
clean: false
- name: Cache Gradle packages
uses: actions/cache@v2
env:
cache-name: build-kernel
with:
path: build-kernel
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_id }}-linux
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_id }}-linux
${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_id }}
- name: Install SSH key for storage
uses: shimataro/ssh-key-action@v2
with:
@@ -169,6 +180,8 @@ jobs:
[[ "$(df | grep "/.tmp" | wc -l)" -eq 0 && $(sudo mountpoint -q build/output/images; echo $?) -eq 1 ]] && sudo rm -rf build/.tmp && break
echo "Mounted temp directories. Trying to unmount."
df | grep ".tmp" | awk '{print $6}' | xargs sudo umount 2>/dev/null || true
sudo rm -f build/cache/hash/*
sudo rm -f build/cache/hash-beta/*
sleep 10
done
[[ -d build/.git ]] && sudo chown -R $USER:$USER build/.git || true
@@ -205,13 +218,19 @@ jobs:
if: ${{ success() && github.repository_owner == 'Armbian' }}
run: |
if [[ $(curl -s http://ifconfig.me) == "93.103.15.56" ]]; then
sudo mkdir -p cache/toolchain cache/rootfs || true
! sudo mountpoint -q cache/toolchain && sudo mount nas:/tank/armbian/toolchain.armbian.com cache/toolchain -o rsize=32768,wsize=32768,timeo=5,retrans=2,actimeo=60,retry=15 || true
fi
CHUNK="${{ matrix.node }}"
BOARD=$(echo $CHUNK | cut -d":" -f1)
BRANCH=$(echo $CHUNK | cut -d":" -f2)
export TERM=dumb
cd build
sudo sed -i "s/-it --rm/-i --rm/" userpatches/config-docker.conf
sudo sed -i "s/-it --rm/-i --rm/" userpatches/config-docker.conf
[[ ! -f .ignore_changes ]] && sudo touch .ignore_changes
./compile.sh docker \
ARMBIAN_MIRROR="https://github.com/armbian/mirror/releases/download/" \
REPOSITORY_INSTALL="u-boot,armbian-bsp-cli,armbian-bsp-desktop,armbian-desktop,armbian-config,armbian-firmware" \
@@ -224,11 +243,18 @@ jobs:
CLEAN_LEVEL="" \
EXPERT="yes"
- name: Unmount upload folders
if [[ $? -eq 0 ]]; then
sudo mkdir -p ../build-kernel
cp cache/hash/*.git* ../build-kernel/ 2> /dev/null || true
cp cache/hash-beta/*.git* ../build-kernel/ 2> /dev/null || true
fi
- name: Unmount folders
run: |
sudo mountpoint -q build/output/debs && sudo fusermount -u build/output/debs || true
sudo mountpoint -q build/output/debs-beta && sudo fusermount -u build/output/debs-beta || true
sudo mountpoint -q build/cache/toolchain && sudo fusermount -u build/cache/toolchain || true
Closing: