@@ -6,38 +6,18 @@ on: [push]
|
|||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
runs-on: ubuntu-test
|
runs-on: ubuntu-test
|
||||||
env:
|
|
||||||
XMAKE_ROOT: y
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Prepare Xmake
|
|
||||||
uses: xmake-io/github-action-setup-xmake@v1
|
|
||||||
with:
|
|
||||||
xmake-version: latest
|
|
||||||
actions-cache-folder: '.xmake-cache'
|
|
||||||
actions-cache-key: 'ubuntu-xmake'
|
|
||||||
|
|
||||||
- name: Packages hash
|
|
||||||
run : |
|
|
||||||
xmake show -l packages | grep -E 'require|project' > ${{ github.workspace }}/packages.txt
|
|
||||||
cat ${{ github.workspace }}/packages.txt
|
|
||||||
|
|
||||||
- name: Calc deps hash
|
|
||||||
uses: https://gitea.com/seepine/hash-files@v1
|
|
||||||
id: get-hash
|
|
||||||
with:
|
|
||||||
patterns: 'packages.txt'
|
|
||||||
|
|
||||||
- name: Packages cache
|
- name: Packages cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.xmake/packages
|
path: ${{ github.workspace }}/build/.packages
|
||||||
key: ${{ runner.os }}-${{ steps.get-hash.outputs.hash }}
|
key: ${{ runner.os }}-xmake_cache
|
||||||
|
|
||||||
- name: XMake config
|
- name: XMake config
|
||||||
run: xmake f --policies=package.install_only -p linux -y
|
run: xmake f -p linux -y
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: xmake
|
run: xmake
|
||||||
|
|||||||
Reference in New Issue
Block a user