limine/.github/workflows/main.yml

116 lines
3.5 KiB
YAML
Raw Normal View History

2021-02-23 01:36:21 +03:00
name: Limine
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build, create release, and upload artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
2021-03-08 11:23:14 +03:00
- name: Build the toolchain (BIOS)
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: make toolchain-bios
2021-02-23 01:36:21 +03:00
2021-03-08 11:23:14 +03:00
- name: Build the toolchain (UEFI)
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: make toolchain-uefi
2021-02-23 01:36:21 +03:00
- name: Build the bootloader
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: apt-get update && apt-get install nasm -y && make
2021-02-23 01:36:21 +03:00
- name: Remove limine-hdd.o
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: rm limine-hdd.o
2021-02-23 01:36:21 +03:00
- name: Build limine-install-linux-x86_64
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: make CFLAGS="-O2 -pipe -static" bin/limine-install
2021-02-23 01:36:21 +03:00
- name: Strip limine-install-linux-x86_64
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: strip bin/limine-install
2021-02-23 01:36:21 +03:00
- name: Rename limine-install-linux-x86_64
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: mv bin/limine-install bin/limine-install-linux-x86_64
- name: Remove limine-hdd.o
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: rm limine-hdd.o
2021-02-23 01:36:21 +03:00
- name: Build limine-install-linux-x86_32
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-i386@v0.3
2021-02-23 01:36:21 +03:00
with:
2021-03-08 11:23:14 +03:00
command: make CFLAGS="-O2 -pipe -static" bin/limine-install
2021-02-23 01:36:21 +03:00
- name: Strip limine-install-linux-x86_32
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-i386@v0.3
2021-02-23 01:36:21 +03:00
with:
2021-03-08 11:23:14 +03:00
command: strip bin/limine-install
2021-02-23 01:36:21 +03:00
- name: Rename limine-install-linux-x86_32
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: mv bin/limine-install bin/limine-install-linux-x86_32
- name: Remove limine-hdd.o
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: rm limine-hdd.o
- name: Build and strip limine-install-win32
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: apt-get update && apt-get install gcc-mingw-w64 -y && make CC="i686-w64-mingw32-gcc" OBJCOPY="i686-w64-mingw32-objcopy" CFLAGS="-O2 -pipe" bin/limine-install && i686-w64-mingw32-strip bin/limine-install.exe
- name: Rename limine-install-linux-win32
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: mv bin/limine-install.exe bin/limine-install-win32.exe
- name: Remove bin/limine-hdd.bin
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: rm bin/limine-hdd.bin
2021-03-08 11:23:14 +03:00
- name: Rename bin directory
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: mv bin limine-binary-${GITHUB_REF##*/}
- name: Package ZIP
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: apt-get update && apt-get install zip -y && zip -r limine-binary-${GITHUB_REF##*/}.zip limine-binary-${GITHUB_REF##*/}
- name: Package tar.xz
uses: mintsuki-org/debian-x86_64@v0.3
2021-02-23 01:36:21 +03:00
with:
2021-03-08 11:23:14 +03:00
command: tar -Jcf limine-binary-${GITHUB_REF##*/}.tar.xz limine-binary-${GITHUB_REF##*/}
2021-02-23 01:36:21 +03:00
- name: Release
uses: softprops/action-gh-release@v1
with:
2021-03-08 11:23:14 +03:00
fail_on_unmatched_files: true
2021-02-23 01:36:21 +03:00
files: |
2021-03-08 11:23:14 +03:00
limine-binary-*.zip
limine-binary-*.tar.xz
2021-02-23 01:36:21 +03:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}