2021-01-14 13:25:02 +01:00
|
|
|
name: Build
|
2021-01-09 01:00:25 +01:00
|
|
|
on:
|
2021-01-14 13:25:02 +01:00
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- edited
|
|
|
|
- ready_for_review
|
|
|
|
- reopened
|
|
|
|
- synchronize
|
2021-01-09 01:00:25 +01:00
|
|
|
push:
|
2022-10-24 23:28:56 +02:00
|
|
|
workflow_dispatch:
|
2021-01-09 01:00:25 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-01-14 13:25:02 +01:00
|
|
|
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
2021-01-09 01:00:25 +01:00
|
|
|
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
2021-09-24 11:47:48 +02:00
|
|
|
- name: Checkout repository and submodules
|
2022-10-28 10:58:17 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-09-24 11:47:48 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-01-09 01:00:25 +01:00
|
|
|
|
|
|
|
- name: Package install
|
|
|
|
run: |
|
|
|
|
sudo add-apt-repository ppa:tkchia/build-ia16
|
|
|
|
sudo apt update
|
2022-05-26 21:35:46 +02:00
|
|
|
sudo apt install gcc-ia16-elf libi86-ia16-elf nasm upx qemu-system-x86 mtools util-linux bash
|
2021-01-09 01:00:25 +01:00
|
|
|
|
|
|
|
- name: build
|
|
|
|
run: ./ci_build.sh
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
run: ./ci_test.sh
|
|
|
|
|
|
|
|
- name: make snapshot name
|
|
|
|
id: snapshotname
|
|
|
|
run: |
|
|
|
|
(
|
|
|
|
today=`date -u +%F | tr '\n' '-'`
|
|
|
|
s_sha=`echo -n ${GITHUB_SHA} | cut -c1-8`
|
2022-10-28 11:08:54 +02:00
|
|
|
printf "fname=snapshot-%s%s\n" $today $s_sha >> $GITHUB_OUTPUT
|
2021-01-09 01:00:25 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
- name: upload
|
2021-01-14 13:25:02 +01:00
|
|
|
if: github.repository == 'FDOS/kernel' &&
|
|
|
|
(github.event_name == 'push' || github.event.pull_request.merged == true)
|
2022-10-28 10:58:17 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-01-09 01:00:25 +01:00
|
|
|
with:
|
|
|
|
name: ${{ steps.snapshotname.outputs.fname }}
|
2021-10-17 07:24:13 +02:00
|
|
|
path: _output/*/*.???
|