mirror of https://github.com/ipxe/ipxe.git
94 lines
2.9 KiB
YAML
94 lines
2.9 KiB
YAML
name: Build and Release
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
build:
|
|
name: Build on ${{ matrix.arch }}
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- arch: x86
|
|
packages: "mtools syslinux isolinux libc6-dev-i386 valgrind libgcc-s1:i386 libc6-dbg:i386"
|
|
build_commands: |
|
|
make -j 4 -C src
|
|
make -j 4 -C src everything
|
|
- arch: arm32
|
|
packages: "mtools syslinux isolinux gcc-arm-none-eabi"
|
|
build_commands: |
|
|
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
|
|
packages: "mtools syslinux isolinux gcc-aarch64-linux-gnu"
|
|
build_commands: |
|
|
make -j 4 -C src CROSS=aarch64-linux-gnu- bin-arm64-efi/ipxe.efi bin-arm64-efi/ipxe.usb bin-arm64-efi/ipxe.iso
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install packages
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y -o Acquire::Retries=50 ${{ matrix.packages }}
|
|
|
|
- name: Build
|
|
run: |
|
|
${{ matrix.build_commands }}
|
|
|
|
- name: Upload artifacts to workflow
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ matrix.arch }}-artifacts
|
|
path: |
|
|
src/bin-*
|
|
|
|
release:
|
|
name: Release and Upload Artifacts
|
|
runs-on: ubuntu-22.04
|
|
needs: build
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Bump version
|
|
id: bump_version
|
|
uses: anothrNick/github-tag-action@1.67.0
|
|
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:
|
|
tag_name: ${{ steps.bump_version.outputs.tag }}
|
|
release_name: Release ${{ steps.bump_version.outputs.tag }}
|
|
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: |
|
|
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 }} |