try fix not-found #18
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 with xmake | |
on: | |
push: | |
branches: | |
- 'main-j' | |
paths: | |
- '**.c' | |
- '**.cpp' | |
- '**.h' | |
- '**.hpp' | |
- '**.rc' | |
- '**.qrc' | |
- '**.ts' | |
- '**.lua' | |
- '.github/workflows/xmake.yaml' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
system: | |
- os: windows-latest | |
lockfile: scripts/xmake/packages/windows.lua | |
- os: ubuntu-latest | |
lockfile: scripts/xmake/packages/linux.lua | |
- os: macos-latest | |
lockfile: scripts/xmake/packages/macosx.lua | |
runs-on: ${{ matrix.system.os }} | |
name: Build on ${{ matrix.system.os }} | |
if: always() | |
env: | |
# Force xmake to a specific folder (for cache) | |
XMAKE_GLOBALDIR: "${{ github.workspace }}/.xmake-global" | |
steps: | |
- uses: xmake-io/github-action-setup-xmake@v1 | |
with: | |
xmake-version: v2.8.3 | |
- name: update repo | |
run: | | |
xrepo update-repo | |
- name: (Linux) Update apt repo | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: cache packages from xrepo | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{ env.XMAKE_GLOBALDIR }}/.xmake/packages | |
key: ${{ runner.os }}-xrepo-qt-${{ hashFiles(matrix.system.lockfile) }} | |
- name: cache xmake | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{ github.workspace }}/.xmake/**/cache | |
${{ github.workspace }}/build/.build_cache | |
${{ github.workspace }}/build/.deps | |
${{ github.workspace }}/build/.gens | |
${{ github.workspace }}/build/.objs | |
key: ${{ runner.os }}-xmake-build-${{ hashFiles('**/xmake.lua') }} | |
- name: config by xmake | |
run: | | |
xmake config --yes --verbose --diagnosis | |
- name: build by xmake | |
run: | | |
xmake build --verbose --diagnosis --jobs=2 |