mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 12:44:24 +02:00
a36b9c64a7
binutils
90 lines
2.3 KiB
YAML
90 lines
2.3 KiB
YAML
name: Build & Release XunilOS
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
build:
|
|
name: Build (${{ matrix.karch }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
karch: [x86_64, aarch64]
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
build-essential \
|
|
gcc \
|
|
binutils \
|
|
gcc-aarch64-linux-gnu \
|
|
binutils-aarch64-linux-gnu \
|
|
libc6-dev-amd64-cross \
|
|
libc6-dev-arm64-cross \
|
|
xorriso \
|
|
curl \
|
|
ccache \
|
|
mold
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
targets: ${{ matrix.karch }}-unknown-none
|
|
|
|
- name: Create assets directory
|
|
run: mkdir -p assets/${{ matrix.karch }}
|
|
|
|
- name: Run build script
|
|
run: bash build_all.sh
|
|
env:
|
|
KARCH: ${{ matrix.karch }}
|
|
|
|
- name: Upload ISO artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: XunilOS-${{ matrix.karch }}.iso
|
|
path: XunilOS-${{ matrix.karch }}.iso
|
|
if-no-files-found: error
|
|
|
|
release:
|
|
name: Publish Release
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Download x86_64 ISO
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: XunilOS-x86_64.iso
|
|
|
|
- name: Download aarch64 ISO
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: XunilOS-aarch64.iso
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: commit-${{ github.sha }}
|
|
name: Commit ${{ github.sha }}
|
|
body: |
|
|
Automated release for commit [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
|
|
files: |
|
|
XunilOS-x86_64.iso
|
|
XunilOS-aarch64.iso
|
|
fail_on_unmatched_files: true
|