limine/.github/workflows/main.yml

96 lines
3.1 KiB
YAML
Raw Normal View History

2021-02-23 01:36:21 +03:00
name: Limine
on:
push:
tags:
- 'v*'
jobs:
build:
2021-03-14 08:59:59 +03:00
name: Build and upload artifacts
2021-02-23 01:36:21 +03:00
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
2021-03-14 08:59:59 +03:00
- name: Rename limine-install-win32
2021-03-08 11:23:14 +03:00
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-14 08:59:59 +03:00
- name: Push binaries to binary branch
2021-03-08 11:23:14 +03:00
uses: mintsuki-org/debian-x86_64@v0.3
with:
2021-03-14 08:59:59 +03:00
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