mirror of https://github.com/ipxe/ipxe.git
trigger workflow
parent
57bdca03df
commit
95de2716ab
|
@ -3,9 +3,33 @@ name: Build and Release
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
cache:
|
||||||
|
name: Cache
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Cache permissions
|
||||||
|
run: |
|
||||||
|
sudo chown $(id -un) /var/cache/apt/archives
|
||||||
|
- name: Cache packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /var/cache/apt/archives/*.deb
|
||||||
|
key: apt-cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
restore-keys: |
|
||||||
|
apt-cache-
|
||||||
|
- name: Download packages
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y -d -o Acquire::Retries=50 \
|
||||||
|
mtools syslinux isolinux \
|
||||||
|
libc6-dev-i386 valgrind \
|
||||||
|
gcc-arm-none-eabi gcc-aarch64-linux-gnu
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build on ${{ matrix.arch }}
|
name: Build on ${{ matrix.arch }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
needs: cache
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -28,8 +52,19 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Cache permissions
|
||||||
|
run: |
|
||||||
|
sudo chown $(id -un) /var/cache/apt/archives
|
||||||
|
|
||||||
|
- name: Cache packages
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
path: /var/cache/apt/archives/*.deb
|
||||||
|
key: apt-cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: |
|
run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y -o Acquire::Retries=50 ${{ matrix.packages }}
|
sudo apt install -y -o Acquire::Retries=50 ${{ matrix.packages }}
|
||||||
|
|
||||||
|
@ -80,15 +115,3 @@ jobs:
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
|
|
||||||
# The following step assumes artifacts are structured in a way that the release job can easily access and upload them.
|
|
||||||
# You may need to adjust the script based on your actual artifact structure and names.
|
|
||||||
- name: Upload Artifacts to Release
|
|
||||||
run: |
|
|
||||||
for artifact in $(ls -1); do
|
|
||||||
if [[ -d "$artifact" ]]; then
|
|
||||||
echo "Uploading $artifact..."
|
|
||||||
gh release upload ${{ github.ref_name }} "${artifact}/*" --clobber -R ${{ github.repository }}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
Loading…
Reference in New Issue