Skip to content

Commit

Permalink
ci(github): update artifact name
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed May 12, 2024
1 parent f028370 commit 52da4bc
Showing 1 changed file with 32 additions and 47 deletions.
79 changes: 32 additions & 47 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@ name: C/C++ CI
on: [push, pull_request]
jobs:
build:
env:
TARGET_MAJOR: 3
TARGET_VERSION: 3.0.0
TARGET_KIND: static
TARGET_ARCH: x64
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
include:
- os: 'ubuntu-latest'
TEST_OPTIONS: --memcheck
TARGET_OS: linux
- os: 'windows-latest'
TARGET_OS: windows
runs-on: ${{ matrix.os }}
name: "Builds binaries on ${{ matrix.os }}"
steps:
Expand All @@ -29,13 +39,13 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get install debhelper lcov valgrind -yy
- name: Configure for coverage mode
if: runner.os == 'Linux'
run: xmake config -m coverage -y -v --ci-env=y

- name: Configure
if: runner.os == 'Windows'
run: xmake config -y -v -k shared --ci-env=y
run: xmake config -y -v -k ${{ env.TARGET_KIND }} -a ${{ env.TARGET_ARCH }} -m ${{ matrix.TARGET_MODE }} --ci-env=y

- name: Configure for coverage mode
if: runner.os == 'Linux'
run: xmake config -y -v -k ${{ env.TARGET_KIND }} -a ${{ env.TARGET_ARCH }} -m coverage --ci-env=y

- name: Build
run: |
Expand All @@ -47,59 +57,34 @@ jobs:
xmake build libi18n-tests
xmake build lcui_tests
- name: Run YUtil tests
if: runner.os == 'Windows'
run: |
xmake run yutil_test
- name: Run PandaGL tests
run: xmake run pandagl_tests

- name: Run YUtil tests
run: |
xmake build yutil_test
xmake run yutil_test ${{matrix.TEST_OPTIONS}}
- name: Run LibCSS tests
if: runner.os == 'Windows'
run: xmake run libcss_tests
run: xmake run libcss_tests ${{matrix.TEST_OPTIONS}}

- name: Run LibUIRouter tests
if: runner.os == 'Windows'
run: xmake run libui-router-tests
run: xmake run libui-router-tests ${{matrix.TEST_OPTIONS}}

- name: Run LibI18n tests
if: runner.os == 'Windows'
run: xmake run libi18n-tests
run: xmake run libi18n-tests ${{matrix.TEST_OPTIONS}}

- name: Run LCUI tests
if: runner.os == 'Windows'
run: xmake run lcui_tests

- name: Run YUtil tests with memcheck
if: runner.os == 'Linux'
run: |
xmake build yutil_test
xmake run yutil_test --memcheck
- name: Run LibCSS tests with memcheck
if: runner.os == 'Linux'
run: xmake run libcss_tests --memcheck

- name: Run LibUIRouter tests with memcheck
if: runner.os == 'Linux'
run: xmake run libui-router-tests --memcheck

- name: Run LibI18n tests with memcheck
if: runner.os == 'Linux'
run: xmake run libi18n-tests --memcheck

- name: Run LCUI tests with memcheck
if: runner.os == 'Linux'
run: xmake run lcui_tests --memcheck
run: xmake run lcui_tests ${{matrix.TEST_OPTIONS}}

- name: Upload reports to Codecov
if: runner.os == 'Linux'
run: bash <(curl -s https://codecov.io/bash);

- name: Reconfigure for release
if: runner.os == 'Linux'
run: xmake config -y -v -k shared --ci-env=y
- name: Build for release
run: |
xmake config -y -v -k ${{ env.TARGET_KIND }} -a ${{ env.TARGET_ARCH }} -m ${{ matrix.TARGET_MODE }}
xmake -w
- name: Package
run: |
Expand All @@ -117,13 +102,13 @@ jobs:
- uses: actions/upload-artifact@master
with:
name: lcui-package (${{ runner.os }})
name: lcui${{ env.TARGET_MAJOR }}-${{ env.TARGET_VERSION }}-${{ env.TARGET_OS }}-${{ env.TARGET_KIND }}
path: |
dist/lcui-package
dist/lcui-${{}}
- uses: actions/upload-artifact@master
with:
name: lcui-examples (${{ runner.os }})
name: lcui3-examples-${{ env.TARGET_OS }}
path: |
dist/lcui-examples
Expand Down

0 comments on commit 52da4bc

Please sign in to comment.