limine/.github/workflows/main.yml
2021-03-14 06:59:59 +01:00

96 lines
3.1 KiB
YAML

name: Limine
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build and upload artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build the toolchain (BIOS)
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: make toolchain-bios
- name: Build the toolchain (UEFI)
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: make toolchain-uefi
- name: Build the bootloader
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: apt-get update && apt-get install nasm -y && make
- name: Remove limine-hdd.o
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: rm limine-hdd.o
- name: Build limine-install-linux-x86_64
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: make CFLAGS="-O2 -pipe -static" bin/limine-install
- name: Strip limine-install-linux-x86_64
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: strip bin/limine-install
- name: Rename limine-install-linux-x86_64
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
- name: Build limine-install-linux-x86_32
uses: mintsuki-org/debian-i386@v0.3
with:
command: make CFLAGS="-O2 -pipe -static" bin/limine-install
- name: Strip limine-install-linux-x86_32
uses: mintsuki-org/debian-i386@v0.3
with:
command: strip bin/limine-install
- name: Rename limine-install-linux-x86_32
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-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
- name: Push binaries to binary branch
uses: mintsuki-org/debian-x86_64@v0.3
with:
command: git checkout --orphan `git branch --show-current`-binary || git checkout `git branch --show-current`-binary && rm -rf `ls -a | grep -v '^\.git$' | grep -v '^\.\.$' | grep -v '^\.$' | grep -v '^bin$'` && mv bin/* ./ && rm -rf bin && git add . && git commit -m "Binary release ${GITHUB_REF##*/}" && git push origin `git branch --show-current`-binary