aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: 7cb3746a01d4eb93885ff53b556926140fd7eab0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Project build

on: push

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - name: Install
        run: sudo apt-get update && sudo apt-get install -y build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo libcloog-isl-dev libisl-0.18-dev ccache curl nasm genisoimage qemu qemu-kvm mtools
      - name: Get cross compiler
        id: cache-cross
        uses: actions/cache@v1
        with:
          path: cross
          key: ${{ runner.os }}-cross
      - name: Build cross compiler
        if: steps.cache-cross.outputs.cache-hit != 'true'
        run: sh run cross
      - name: Build
        run: sh run build
      - name: Test install
        run: sh run image
      - name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: build/melvix.iso
          name: Melvix Weekly Release
          prerelease: 1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}