Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #3

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 45 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ jobs:
id: cache-restore-deps
uses: actions/cache/restore@v3
with:
path: |
dep-cache/
key: ${{ matrix.build_type }}-${{ github.event.pull_request.base.sha }}-dep-cache
path: dep-cache
key: ${{ matrix.build_type }}-${{ github.event.pull_request.base.sha }}-Linux-dep-cache
if: github.event_name == 'pull_request'
- name: Build
shell: bash
Expand All @@ -39,7 +38,7 @@ jobs:
uses: actions/cache/save@v3
with:
path: dep-cache
key: ${{ matrix.build_type }}-${{ github.sha }}-dep-cache
key: ${{ matrix.build_type }}-${{ github.sha }}-Linux-dep-cache
if: github.ref_name == github.event.repository.default_branch && matrix.cloud_provider == 'AWS'
- uses: actions/setup-python@v1
with:
Expand All @@ -58,13 +57,27 @@ jobs:
cloud_provider: [ 'AWS', 'AZURE', 'GCP' ]
steps:
- uses: actions/checkout@v1
- name: Restore cached deps
id: cache-restore-deps
uses: actions/cache/restore@v3
with:
path: dep-cache
key: ${{ matrix.build_type }}-${{ matrix.platform }}-${{ matrix.vs_version }}-${{ github.event.pull_request.base.sha }}-Win-dep-cache
if: github.event_name == 'pull_request'
- name: Build
shell: cmd
env:
PLATFORM: ${{ matrix.platform }}
BUILD_TYPE: ${{ matrix.build_type }}
VS_VERSION: ${{ matrix.vs_version }}
run: ci\build_win.bat
- name: Cache deps
id: cache-save-deps
uses: actions/cache/save@v3
with:
path: dep-cache
key: ${{ matrix.build_type }}-${{ matrix.platform }}-${{ matrix.vs_version }}-${{ github.sha }}-Win-dep-cache
if: github.ref_name == github.event.repository.default_branch && matrix.cloud_provider == 'AWS'
- uses: actions/setup-python@v1
with:
python-version: '3.7'
Expand All @@ -90,13 +103,27 @@ jobs:
cloud_provider: [ 'AWS', 'AZURE', 'GCP' ]
steps:
- uses: actions/checkout@v1
- name: Restore cached deps
id: cache-restore-deps
uses: actions/cache/restore@v3
with:
path: dep-cache
key: ${{ matrix.build_type }}-${{ matrix.platform }}-${{ matrix.vs_version }}-${{ github.event.pull_request.base.sha }}-Win-dep-cache
if: github.event_name == 'pull_request'
- name: Build
shell: cmd
env:
PLATFORM: ${{ matrix.platform }}
BUILD_TYPE: ${{ matrix.build_type }}
VS_VERSION: ${{ matrix.vs_version }}
run: ci\build_win.bat
- name: Cache deps
id: cache-save-deps
uses: actions/cache/save@v3
with:
path: dep-cache
key: ${{ matrix.build_type }}-${{ matrix.platform }}-${{ matrix.vs_version }}-${{ github.sha }}-Win-dep-cache
if: github.ref_name == github.event.repository.default_branch && matrix.cloud_provider == 'AWS'
- uses: actions/setup-python@v1
with:
python-version: '3.7'
Expand All @@ -123,11 +150,25 @@ jobs:
- name: Install Homebrew Bash
shell: bash
run: brew install bash
- name: Restore cached deps
id: cache-restore-deps
uses: actions/cache/restore@v3
with:
path: dep-cache
key: ${{ matrix.build_type }}-${{ github.event.pull_request.base.sha }}-Mac-dep-cache
if: github.event_name == 'pull_request'
- name: Build
shell: bash
env:
BUILD_TYPE: ${{ matrix.build_type }}
run: ./ci/build_mac.sh
- name: Cache deps
id: cache-save-deps
uses: actions/cache/save@v3
with:
path: dep-cache
key: ${{ matrix.build_type }}-${{ github.sha }}-Mac-dep-cache
if: github.ref_name == github.event.repository.default_branch && matrix.cloud_provider == 'AWS'
- name: Test
shell: bash
env:
Expand Down
15 changes: 14 additions & 1 deletion ci/build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,20 @@ goto :EOF
call %build_script% :get_version
call %utils_script% :get_zip_file_name %component_name% %version%
if defined GITHUB_ACTIONS (
call %build_script% :build %platform% %build_type% %vs_version% %dynamic_runtime%
cmd /c copy %curdir%\dep-cache\%zip_file_name% %curdir%\artifacts\
if !ERRORLEVEL! NEQ 0 (
call %build_script% :build %platform% %build_type% %vs_version% %dynamic_runtime%
echo === copying %curdir%\artifacts\%zip_file_name% ===
if not exist "%curdir%\dep-cache" md "%curdir%\dep-cache"
cmd /c copy "artifacts\%zip_file_name%" "%curdir%\dep-cache\"
) else (
if not exist deps-build\%arcdir%\%vsdir%\%build_type% md deps-build\%arcdir%\%vsdir%\%build_type%
pushd deps-build\%arcdir%\%vsdir%\%build_type%
if !ERRORLEVEL! NEQ 0 goto :error
rd /s /q %component_name%
7z x "%curdir%\artifacts\%zip_file_name%"
popd
)
if !ERRORLEVEL! NEQ 0 goto :error
) else (
echo === download or build: %component_name% ===
Expand Down
4 changes: 0 additions & 4 deletions scripts/utils.bat
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ goto :EOF

:zip_file
setlocal
if not defined JENKINS_URL (
echo === No zip file is created if not Jenkins
goto :EOF
)
set component_name=%~1
set component_version=%~2
if not exist artifacts md artifacts
Expand Down
1 change: 0 additions & 1 deletion test

This file was deleted.

Loading