CI: Cache XMake build
This commit is contained in:
parent
8db95b445b
commit
96a3629968
|
|
@ -39,27 +39,33 @@ jobs:
|
||||||
with:
|
with:
|
||||||
msystem: ${{ matrix.msystem }}
|
msystem: ${{ matrix.msystem }}
|
||||||
install: base-devel git unzip p7zip mingw-w64-${{ matrix.arch }}-toolchain
|
install: base-devel git unzip p7zip mingw-w64-${{ matrix.arch }}-toolchain
|
||||||
location: D:\
|
|
||||||
update: true
|
update: true
|
||||||
|
|
||||||
- name: Set mingw64 binaries in path
|
|
||||||
run: |
|
|
||||||
echo "${MINGW_PREFIX}/bin"
|
|
||||||
echo "D:/msys64/mingw64/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
# Force xmake to a specific folder (for cache)
|
# Force xmake to a specific folder (for cache)
|
||||||
- name: Set xmake env
|
- name: Set xmake env
|
||||||
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
|
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Install xmake
|
# Cache xmake build
|
||||||
|
- name: Retrieve cached xmake build
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: xmake_cache
|
||||||
|
with:
|
||||||
|
path: ${{ runner.workspace }}/xmake_git
|
||||||
|
key: MinGW-XMake-r1
|
||||||
|
|
||||||
|
# Build xmake
|
||||||
- name: Setup xmake
|
- name: Setup xmake
|
||||||
|
if: steps.xmake_cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b dev xmake_git
|
git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b dev xmake_git
|
||||||
cd xmake_git
|
cd xmake_git
|
||||||
make build
|
make build
|
||||||
|
|
||||||
|
# Install xmake
|
||||||
|
- name: Install xmake
|
||||||
|
run: |
|
||||||
make install PREFIX=/${{ matrix.msystem }}
|
make install PREFIX=/${{ matrix.msystem }}
|
||||||
xmake --version
|
xmake --version
|
||||||
cd ..
|
|
||||||
|
|
||||||
# Update xmake repository (in order to have the file that will be cached)
|
# Update xmake repository (in order to have the file that will be cached)
|
||||||
- name: Update xmake repository
|
- name: Update xmake repository
|
||||||
|
|
@ -74,7 +80,7 @@ jobs:
|
||||||
- name: Retrieve cached xmake dependencies
|
- name: Retrieve cached xmake dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ env.XMAKE_GLOBALDIR }}\.xmake\packages
|
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||||
key: MinGW-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-r4
|
key: MinGW-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-r4
|
||||||
|
|
||||||
# Setup compilation mode and install project dependencies
|
# Setup compilation mode and install project dependencies
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue