mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 14:44:26 +02:00
Update build script to create assets directory and only install what is
needed for both arches
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
name: Build & Release XunilOS
|
name: Build & Release XunilOS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build (${{ matrix.karch }})
|
name: Build (${{ matrix.karch }})
|
||||||
@@ -10,47 +12,66 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
karch: [x86_64, aarch64]
|
karch: [x86_64, aarch64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository with submodules
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Install build dependencies
|
|
||||||
|
- name: Install build dependencies (x86_64)
|
||||||
|
if: matrix.karch == 'x86_64'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
gcc \
|
gcc \
|
||||||
|
gcc-multilib \
|
||||||
|
xorriso \
|
||||||
|
curl
|
||||||
|
|
||||||
|
- name: Install build dependencies (aarch64)
|
||||||
|
if: matrix.karch == 'aarch64'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y \
|
||||||
|
build-essential \
|
||||||
gcc-aarch64-linux-gnu \
|
gcc-aarch64-linux-gnu \
|
||||||
binutils-aarch64-linux-gnu \
|
binutils-aarch64-linux-gnu \
|
||||||
|
libc6-dev-arm64-cross \
|
||||||
xorriso \
|
xorriso \
|
||||||
curl \
|
curl
|
||||||
ccache
|
|
||||||
- name: Install Rust nightly toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
with:
|
||||||
targets: |
|
targets: ${{ matrix.karch }}-unknown-none
|
||||||
x86_64-unknown-none
|
|
||||||
aarch64-unknown-none
|
- name: Create assets directory
|
||||||
|
run: mkdir -p assets/${{ matrix.karch }}
|
||||||
|
|
||||||
- name: Run build script
|
- name: Run build script
|
||||||
run: bash build_all.sh
|
run: bash build_all.sh
|
||||||
env:
|
env:
|
||||||
KARCH: ${{ matrix.karch }}
|
KARCH: ${{ matrix.karch }}
|
||||||
|
|
||||||
- name: Upload ISO artifact
|
- name: Upload ISO artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: XunilOS-${{ matrix.karch }}.iso
|
name: XunilOS-${{ matrix.karch }}.iso
|
||||||
path: XunilOS-${{ matrix.karch }}.iso
|
path: XunilOS-${{ matrix.karch }}.iso
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Publish Release
|
name: Publish Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository with submodules
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
@@ -59,12 +80,12 @@ jobs:
|
|||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: XunilOS-x86_64.iso
|
name: XunilOS-x86_64.iso
|
||||||
path: ./artifacts
|
|
||||||
- name: Download aarch64 ISO
|
- name: Download aarch64 ISO
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: XunilOS-aarch64.iso
|
name: XunilOS-aarch64.iso
|
||||||
path: ./artifacts
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@@ -73,6 +94,6 @@ jobs:
|
|||||||
body: |
|
body: |
|
||||||
Automated release for commit [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
|
Automated release for commit [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
|
||||||
files: |
|
files: |
|
||||||
artifacts/XunilOS-x86_64.iso
|
XunilOS-x86_64.iso
|
||||||
artifacts/XunilOS-aarch64.iso
|
XunilOS-aarch64.iso
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
|
|||||||
Reference in New Issue
Block a user