fixup! build: update c/cpp workflow #55
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: C/C++ CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
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 | |
- name: setup | |
run: | | |
git submodule sync --recursive | |
git submodule update --init --recursive | |
- name: Install packages | |
run: | | |
npm install | |
npm install -g @lcui/cli | |
- name: Restore xmake packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.xmake/.cache/packages | |
key: ${{ runner.os }}-xmake-packages | |
- name: build | |
run: | | |
lcui compile ./src | |
xmake config -y -v | |
xmake -v | |
- name: Package | |
run: | | |
xmake package -v | |
xmake install -o app | |
- uses: actions/upload-artifact@master | |
with: | |
name: package (${{ runner.os }}) | |
path: dist | |
- name: Cache xmake packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.xmake/.cache/packages | |
key: ${{ runner.os }}-xmake-packages |