Fixup for updated distros and mod-ui #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
env: | |
CACHE_VERSION: 20230707 | |
WORKDIR: /home/runner/mod-workdir | |
jobs: | |
toolchain: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
key: toolchain-${{ env.CACHE_VERSION }} | |
path: ${{ env.WORKDIR }} | |
- uses: jpribyl/action-docker-layer-caching@v0.1.1 | |
with: | |
key: docker-layer-for-mod-os-${{ env.CACHE_VERSION }} | |
- name: make toolchain | |
run: | | |
make toolchain | |
- name: pack toolchain | |
run: | | |
tar -C ${{ env.WORKDIR }} -czf workdir-toolchain-${{ env.CACHE_VERSION }}.tar.gz x86_64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: workdir-toolchain-${{ env.CACHE_VERSION }} | |
path: workdir-toolchain-${{ env.CACHE_VERSION }}.tar.gz | |
bootstrap: | |
needs: toolchain | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
key: bootstrap-${{ env.CACHE_VERSION }} | |
path: ${{ env.WORKDIR }} | |
- uses: jpribyl/action-docker-layer-caching@v0.1.1 | |
with: | |
key: docker-layer-for-mod-os-${{ env.CACHE_VERSION }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: workdir-toolchain-${{ env.CACHE_VERSION }} | |
path: /home/runner | |
- name: Extract workdir-toolchain-${{ env.CACHE_VERSION }} | |
shell: bash | |
run: | | |
mkdir -p ${{ env.WORKDIR }} | |
sudo tar -C ${{ env.WORKDIR }} -x --overwrite -f ~/workdir-toolchain-${{ env.CACHE_VERSION }}.tar.gz | |
- name: make bootstrap | |
run: | | |
touch toolchain/.stamp_built | |
make bootstrap | |
- name: pack bootstrap | |
run: | | |
tar -C ${{ env.WORKDIR }} -czf workdir-bootstrap-${{ env.CACHE_VERSION }}.tar.gz x86_64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: workdir-bootstrap-${{ env.CACHE_VERSION }} | |
path: workdir-bootstrap-${{ env.CACHE_VERSION }}.tar.gz | |
mod-os: | |
needs: bootstrap | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
key: mod-os-${{ env.CACHE_VERSION }} | |
path: ${{ env.WORKDIR }} | |
- uses: jpribyl/action-docker-layer-caching@v0.1.1 | |
with: | |
key: docker-layer-for-mod-os-${{ env.CACHE_VERSION }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: workdir-bootstrap-${{ env.CACHE_VERSION }} | |
path: /home/runner | |
- name: Extract workdir-bootstrap | |
shell: bash | |
run: | | |
mkdir -p ${{ env.WORKDIR }} | |
sudo tar -C ${{ env.WORKDIR }} -x --overwrite -f ~/workdir-bootstrap-${{ env.CACHE_VERSION }}.tar.gz | |
- name: make mod-os | |
env: | |
NOCLEAN: 1 | |
run: | | |
touch toolchain/.stamp_built | |
touch bootstrap/.stamp_built | |
make mod-os | |
- name: pack mod-os | |
run: | | |
tar -C ${{ env.WORKDIR }} -czf workdir-mod-os-${{ env.CACHE_VERSION }}.tar.gz x86_64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: workdir-mod-os-${{ env.CACHE_VERSION }} | |
path: workdir-mod-os-${{ env.CACHE_VERSION }}.tar.gz | |
plugins-bootstrap: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/cache@v3 | |
with: | |
key: plugins-bootstrap-${{ env.CACHE_VERSION }} | |
path: ${{ env.WORKDIR }} | |
- uses: jpribyl/action-docker-layer-caching@v0.1.1 | |
with: | |
key: docker-layer-for-plugins-${{ env.CACHE_VERSION }} | |
- name: make plugins-bootstrap | |
run: | | |
mkdir -p ${{ env.WORKDIR }} | |
make plugins-bootstrap | |
plugins: | |
needs: plugins-bootstrap | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/cache@v3 | |
with: | |
key: plugins-${{ env.CACHE_VERSION }} | |
path: | | |
plugins/.stamps | |
plugins/bundles | |
- uses: jpribyl/action-docker-layer-caching@v0.1.1 | |
with: | |
key: docker-layer-for-plugins-${{ env.CACHE_VERSION }} | |
- name: make plugins | |
run: | | |
# touch toolchain/.stamp_built | |
make plugins | |
- name: pack plugin bundles | |
run: | | |
tar -czf plugin-bundles-${{ env.CACHE_VERSION }}.tar.gz plugins/bundles | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: plugin-bundles-${{ env.CACHE_VERSION }} | |
path: plugin-bundles-${{ env.CACHE_VERSION }}.tar.gz | |
iso: | |
needs: [mod-os, plugins] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
key: iso-${{ env.CACHE_VERSION }} | |
path: | | |
archiso/cache | |
- uses: jpribyl/action-docker-layer-caching@v0.1.1 | |
with: | |
key: docker-layer-for-iso-${{ env.CACHE_VERSION }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: workdir-mod-os-${{ env.CACHE_VERSION }} | |
path: /home/runner | |
- uses: actions/download-artifact@v3 | |
with: | |
name: plugin-bundles-${{ env.CACHE_VERSION }} | |
path: /home/runner | |
- name: Extract workdir-mod-os | |
shell: bash | |
run: | | |
mkdir -p ${{ env.WORKDIR }} | |
sudo tar -C ${{ env.WORKDIR }} -x --overwrite -f ~/workdir-mod-os-${{ env.CACHE_VERSION }}.tar.gz | |
- name: Extract plugin bundles | |
shell: bash | |
run: | | |
sudo tar -x --overwrite -f ~/plugin-bundles-${{ env.CACHE_VERSION }}.tar.gz | |
- name: make iso | |
run: | | |
touch toolchain/.stamp_built | |
touch bootstrap/.stamp_built | |
touch plugins/.stamp_built | |
touch mod-os/.stamp_built | |
ln -sf ${{ env.WORKDIR }}/x86_64/images/rootfs.ext2 mod-os/rootfs.ext2 | |
make iso | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iso | |
path: archiso/output/*.iso | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
draft: false | |
prerelease: true | |
files: | | |
archiso/output/*.iso |