mirror of https://github.com/ipxe/ipxe.git
Modify build and add release step
parent
59f27d6935
commit
57bdca03df
|
@ -1,121 +1,94 @@
|
||||||
name: Build
|
name: Build and Release
|
||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build:
|
||||||
cache:
|
name: Build on ${{ matrix.arch }}
|
||||||
name: Cache
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
strategy:
|
||||||
- name: Cache permissions
|
matrix:
|
||||||
run: |
|
include:
|
||||||
sudo chown $(id -un) /var/cache/apt/archives
|
- arch: x86
|
||||||
- name: Cache packages
|
packages: "mtools syslinux isolinux libc6-dev-i386 valgrind libgcc-s1:i386 libc6-dbg:i386"
|
||||||
uses: actions/cache@v4
|
build_commands: |
|
||||||
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
|
|
||||||
|
|
||||||
x86:
|
|
||||||
name: x86
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: cache
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
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
|
|
||||||
run: |
|
|
||||||
sudo dpkg --add-architecture i386
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y -o Acquire::Retries=50 \
|
|
||||||
mtools syslinux isolinux \
|
|
||||||
libc6-dev-i386 valgrind \
|
|
||||||
libgcc-s1:i386 libc6-dbg:i386
|
|
||||||
- name: Build (BIOS)
|
|
||||||
run: |
|
|
||||||
make -j 4 -C src
|
make -j 4 -C src
|
||||||
- name: Build (Everything)
|
|
||||||
run: |
|
|
||||||
make -j 4 -C src everything
|
make -j 4 -C src everything
|
||||||
- name: Test
|
- arch: arm32
|
||||||
run: |
|
packages: "mtools syslinux isolinux gcc-arm-none-eabi"
|
||||||
valgrind ./src/bin-i386-linux/tests.linux
|
build_commands: |
|
||||||
valgrind ./src/bin-x86_64-linux/tests.linux
|
make -j 4 -C src CROSS=arm-none-eabi- bin-arm32-efi/intel.efi bin-arm32-efi/intel.usb bin-arm32-efi/intel.iso
|
||||||
|
- arch: arm64
|
||||||
arm32:
|
packages: "mtools syslinux isolinux gcc-aarch64-linux-gnu"
|
||||||
name: ARM32
|
build_commands: |
|
||||||
runs-on: ubuntu-22.04
|
make -j 4 -C src CROSS=aarch64-linux-gnu- bin-arm64-efi/ipxe.efi bin-arm64-efi/ipxe.usb bin-arm64-efi/ipxe.iso
|
||||||
needs: cache
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
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 apt update
|
sudo apt update
|
||||||
sudo apt install -y -o Acquire::Retries=50 \
|
sudo apt install -y -o Acquire::Retries=50 ${{ matrix.packages }}
|
||||||
mtools syslinux isolinux gcc-arm-none-eabi
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
make -j 4 -C src CROSS=arm-none-eabi- \
|
${{ matrix.build_commands }}
|
||||||
bin-arm32-efi/intel.efi \
|
|
||||||
bin-arm32-efi/intel.usb \
|
|
||||||
bin-arm32-efi/intel.iso
|
|
||||||
|
|
||||||
arm64:
|
- name: Upload artifacts to workflow
|
||||||
name: ARM64
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.arch }}-artifacts
|
||||||
|
path: |
|
||||||
|
src/bin-*
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Release and Upload Artifacts
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: cache
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Cache permissions
|
|
||||||
run: |
|
- name: Bump version
|
||||||
sudo chown $(id -un) /var/cache/apt/archives
|
id: bump_version
|
||||||
- name: Cache packages
|
uses: anothrNick/github-tag-action@1.67.0
|
||||||
uses: actions/cache/restore@v4
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
INITIAL_VERSION: 1.21.1
|
||||||
|
DEFAULT_BUMP: minor
|
||||||
|
PRERELEASE: true
|
||||||
|
PRERELEASE_SUFFIX: ${{ env.BRANCH_NAME }}
|
||||||
|
RELEASE_BRANCHES: master
|
||||||
|
WITH_V: true
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
path: /var/cache/apt/archives/*.deb
|
tag_name: ${{ steps.bump_version.outputs.tag }}
|
||||||
key: apt-cache-${{ github.run_id }}-${{ github.run_attempt }}
|
release_name: Release ${{ steps.bump_version.outputs.tag }}
|
||||||
- name: Install packages
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Download all artifacts
|
||||||
|
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: |
|
run: |
|
||||||
sudo apt update
|
for artifact in $(ls -1); do
|
||||||
sudo apt install -y -o Acquire::Retries=50 \
|
if [[ -d "$artifact" ]]; then
|
||||||
mtools syslinux isolinux gcc-aarch64-linux-gnu
|
echo "Uploading $artifact..."
|
||||||
- name: Build
|
gh release upload ${{ github.ref_name }} "${artifact}/*" --clobber -R ${{ github.repository }}
|
||||||
run: |
|
fi
|
||||||
make -j 4 -C src CROSS=aarch64-linux-gnu- \
|
done
|
||||||
bin-arm64-efi/ipxe.efi \
|
env:
|
||||||
bin-arm64-efi/ipxe.usb \
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
bin-arm64-efi/ipxe.iso
|
|
Loading…
Reference in New Issue