msys2: use xmake package instead of compiling from source
This commit is contained in:
parent
8bfa5b4614
commit
94035c1db8
|
|
@ -45,37 +45,13 @@ jobs:
|
|||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
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 mingw-w64-${{ matrix.arch }}-xmake
|
||||
update: true
|
||||
|
||||
# Force xmake to a specific folder (for cache)
|
||||
- name: Set xmake env
|
||||
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
|
||||
|
||||
# Cache xmake build
|
||||
- name: Retrieve cached xmake build
|
||||
uses: actions/cache@v3
|
||||
id: xmake_cache
|
||||
with:
|
||||
path: ${{ github.workspace }}/xmake_git
|
||||
key: MinGW-XMake-W${{ steps.cache_key.outputs.key }}
|
||||
|
||||
# Build xmake
|
||||
- name: Setup xmake
|
||||
if: steps.xmake_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b dev xmake_git
|
||||
cd xmake_git
|
||||
./configure
|
||||
make -j4
|
||||
|
||||
# Install xmake
|
||||
- name: Install xmake
|
||||
run: |
|
||||
cd xmake_git
|
||||
make install PREFIX=/${{ matrix.msystem }}
|
||||
xmake --version
|
||||
|
||||
# Update xmake repository (in order to have the file that will be cached)
|
||||
- name: Update xmake repository
|
||||
run: xmake repo --update
|
||||
|
|
|
|||
Loading…
Reference in New Issue