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 7afa08f
Showing 1 changed file with 31 additions and 51 deletions.
82 changes: 31 additions & 51 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ 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
Expand Down Expand Up @@ -29,13 +34,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 release --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 +52,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 LibCSS tests
if: runner.os == 'Windows'
run: xmake run libcss_tests

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

- name: Run LibI18n tests
if: runner.os == 'Windows'
run: xmake run libi18n-tests

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

- name: Run YUtil tests with memcheck
- name: Run tests with memcheck
if: runner.os == 'Linux'
run: |
xmake build yutil_test
xmake run pandagl_tests
xmake run yutil_test --memcheck
xmake run libcss_tests --memcheck
xmake run libui-router-tests --memcheck
xmake run libi18n-tests --memcheck
xmake run lcui_tests --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
- name: Run tests
if: runner.os == 'Windows'
run: |
xmake run pandagl_tests
xmake run yutil_test
xmake run libcss_tests
xmake run libui-router-tests
xmake run libi18n-tests
xmake run lcui_tests
- 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 release
xmake -w
- name: Package
run: |
Expand All @@ -117,13 +97,13 @@ jobs:
- uses: actions/upload-artifact@master
with:
name: lcui-package (${{ runner.os }})
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-examples (${{ runner.os }})
name: lcui${{ env.TARGET_MAJOR }}-examples (${{ runner.os }})
path: |
dist/lcui-examples
Expand Down

0 comments on commit 7afa08f

Please sign in to comment.