forked from KolibriOS/kolibrios
CI: Cache
This commit is contained in:
@@ -4,12 +4,9 @@
|
|||||||
name: 'Build system'
|
name: 'Build system'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'main'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- 'main'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
codestyle:
|
codestyle:
|
||||||
@@ -36,7 +33,15 @@ jobs:
|
|||||||
id: vars
|
id: vars
|
||||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITEA_OUTPUT
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
|
- name: Restore toolchain
|
||||||
|
id: cache-toolchain
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
path: /home/autobuild
|
||||||
|
key: kolibri-toolchain
|
||||||
|
|
||||||
- name: Build and install C--
|
- name: Build and install C--
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ gitea.workspace }}/programs/develop/cmm/
|
cd ${{ gitea.workspace }}/programs/develop/cmm/
|
||||||
make -f Makefile.lin32
|
make -f Makefile.lin32
|
||||||
@@ -46,17 +51,20 @@ jobs:
|
|||||||
make -f Makefile.lin32 clean
|
make -f Makefile.lin32 clean
|
||||||
|
|
||||||
- name: Install TCC
|
- name: Install TCC
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cp ${{ gitea.workspace }}/programs/develop/ktcc/trunk/bin/kos32-tcc /home/autobuild/tools/win32/bin/kos32-tcc
|
cp ${{ gitea.workspace }}/programs/develop/ktcc/trunk/bin/kos32-tcc /home/autobuild/tools/win32/bin/kos32-tcc
|
||||||
chmod +x /home/autobuild/tools/win32/bin/kos32-tcc
|
chmod +x /home/autobuild/tools/win32/bin/kos32-tcc
|
||||||
|
|
||||||
- name: Build and install objconv
|
- name: Build and install objconv
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ gitea.workspace }}/programs/develop/objconv/
|
cd ${{ gitea.workspace }}/programs/develop/objconv/
|
||||||
g++ -o /home/autobuild/tools/win32/bin/objconv -O2 *.cpp
|
g++ -o /home/autobuild/tools/win32/bin/objconv -O2 *.cpp
|
||||||
chmod +x /home/autobuild/tools/win32/bin/objconv
|
chmod +x /home/autobuild/tools/win32/bin/objconv
|
||||||
|
|
||||||
- name: Build and install kerpack
|
- name: Build and install kerpack
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/
|
cd ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/
|
||||||
make
|
make
|
||||||
@@ -64,6 +72,7 @@ jobs:
|
|||||||
mv kerpack /home/autobuild/tools/win32/bin/.
|
mv kerpack /home/autobuild/tools/win32/bin/.
|
||||||
|
|
||||||
- name: Build and install kpack
|
- name: Build and install kpack
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ gitea.workspace }}/programs/other/kpack/linux/
|
cd ${{ gitea.workspace }}/programs/other/kpack/linux/
|
||||||
bash build.sh
|
bash build.sh
|
||||||
@@ -71,12 +80,26 @@ jobs:
|
|||||||
mv kpack /home/autobuild/tools/win32/bin/.
|
mv kpack /home/autobuild/tools/win32/bin/.
|
||||||
|
|
||||||
- name: Build and install clink
|
- name: Build and install clink
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ gitea.workspace }}/programs/develop/clink
|
cd ${{ gitea.workspace }}/programs/develop/clink
|
||||||
gcc main.c -o clink
|
gcc main.c -o clink
|
||||||
chmod a+x clink
|
chmod a+x clink
|
||||||
mv clink /home/autobuild/tools/win32/bin/clink
|
mv clink /home/autobuild/tools/win32/bin/clink
|
||||||
|
|
||||||
|
- name: Prepare cache folder
|
||||||
|
run: |
|
||||||
|
rm /home/autobuild
|
||||||
|
mv /root/autobuild /home/autobuild
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: Save toolchain
|
||||||
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: /home/autobuild
|
||||||
|
key: kolibri-toolchain
|
||||||
|
|
||||||
- name: Configure tup
|
- name: Configure tup
|
||||||
run: |
|
run: |
|
||||||
cd ${{ gitea.workspace }}
|
cd ${{ gitea.workspace }}
|
||||||
|
Reference in New Issue
Block a user