Skip to content

update xmake.lua

update xmake.lua #781

Workflow file for this run

name: C/C++ CI
on: [push, pull_request]
jobs:
build:
env:
TARGET_MAJOR: 3
TARGET_VERSION: 3.0.0
TARGET_KIND: static
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
name: "Builds binaries on ${{ matrix.os }}"
steps:
- uses: actions/checkout@v1
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@dev
- name: Update git submodule
run: |
git submodule update --init
- name: Restore xmake packages
uses: actions/cache@v4
with:
path: ~/.xmake/.cache/packages
key: ${{ runner.os }}-xmake-packages
- name: Install tools
if: runner.os == 'Linux'
run: |
sudo apt-get update --fix-missing
sudo apt-get install debhelper lcov valgrind -yy
- name: Configure
if: runner.os == 'Windows'
run: xmake config -y -k ${{ env.TARGET_KIND }} -m release --ci-env=y
- name: Build for release
run: |
xmake config -y -v -k ${{ env.TARGET_KIND }} -m release
xmake
- name: Package
run: |
xmake package -v
xmake install -o dist/lcui-package
- name: Build examples
run: |
cd examples
xmake config -P . -y -vD
xmake build -P . -vD
xmake install -P . -o ../dist/lcui-examples
mv ../dist/lcui-examples/bin/* ../dist/lcui-examples/
rm -r ../dist/lcui-examples/bin
- uses: actions/upload-artifact@master
with:
name: lcui${{ env.TARGET_MAJOR }}-${{ env.TARGET_VERSION }}-${{ env.TARGET_KIND }} (${{ runner.os }})
path: |
dist/lcui-package
- uses: actions/upload-artifact@master
with:
name: lcui${{ env.TARGET_MAJOR }}-examples (${{ runner.os }})
path: |
dist/lcui-examples
- name: Cache xmake packages
uses: actions/cache@v4
with:
path: ~/.xmake/.cache/packages
key: ${{ runner.os }}-xmake-packages