Skip to content

Commit

Permalink
CI: modify ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Feb 4, 2024
1 parent c0dfc92 commit 94cf626
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 14 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ jobs:
cp $APK_FILE Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk
7z a Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.zip install/*
- name: Update configure file
working-directory: ${{github.workspace}}/build
run: |
${{env.SOURCE_DIR}}/RabbitCommon/Install/GenerateJson.sh \
update_android_${{matrix.qt_version}}.json \
Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk \
android ${{matrix.qt_arch}} \
"https://github.com/KangLin/Calendar/releases/download/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk,https://sourceforge.net/projects/rabbitcalendar/files/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk"
- name: Update xml file
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_arch == 'android_armv7' }}
working-directory: ${{github.workspace}}/build
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ jobs:
name: ${{ needs.android.outputs.name }}
path: ${{ env.artifact_path }}

- name: Process configure file
run: |
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y xvfb xpra
sudo Xvfb :99 -ac &
export DISPLAY=:99.0
cd ${{ env.artifact_path }}
- name: Make Note.md file
run: |
cd ${{ env.artifact_path }}
Expand All @@ -71,8 +80,8 @@ jobs:
echo "文件签名:" >> ${{github.workspace}}/Note.md
for file in *
do
#echo $file
if [ -f $file ] && [ "${file##*.}" != "xml" ]; then
echo $file
if [ -f $file ] && [ "${file##*.}" != "xml" ] && [ "${file##*.}" != "json" ] ; then
#echo "md5sum $file"
md5sum $file > $file.md5sum
cat $file.md5sum >> ${{github.workspace}}/Note.md
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,27 @@ jobs:
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
7z a Calendar_${{env.Calendar_VERSION}}_macos_qt${{matrix.qt_version}}.zip ./install/*
- name: Update configure file
if: ${{ matrix.BUILD_TYPE == 'Release' }}
working-directory: ${{github.workspace}}/build
run: |
./install/bin/CalendarApp.sh \
-f "${{github.workspace}}/update_macos.${{matrix.qt_version}}.json" \
--foc 1 \
--md5 ${MD5} \
-n "Calendar_${{env.Calendar_VERSION}}_macos_qt${{matrix.qt_version}}.zip" \
-m "${{env.Calendar_VERSION}}" \
-u "https://github.com/KangLin/Calendar/releases/download/v${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_macos_qt${{matrix.qt_version}}.zip;https://sourceforge.net/projects/rabbitcalendar/files/v${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_macos_qt${{matrix.qt_version}}.zip"
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.6.1' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: |
${{github.workspace}}/build/Calendar_${{env.Calendar_VERSION}}_macos_qt${{matrix.qt_version}}.zip
${{github.workspace}}/update_macos.${{matrix.qt_version}}.json
${{github.workspace}}/update_macos.${{matrix.qt_version}}.json.xml
# - name: Upload To Github Release
# if: ${{ matrix.BUILD_TYPE == 'Release' && startsWith(github.ref, 'refs/tags/') }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,20 @@ jobs:
makensis Install.nsi
copy Calendar_Setup_${{env.Calendar_VERSION}}.exe Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe
- name: Update xml file
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '5.12.12' }}
# - name: Update version configure file
# if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '5.12.12' }}
# working-directory: ${{github.workspace}}\build
# run: |
# .\install\bin\CalendarApp.exe ^
# -f "${{github.workspace}}\build\version.json" ^
# --foc 0

- name: Update configure file
if: ${{ matrix.BUILD_TYPE == 'Release' }}
working-directory: ${{github.workspace}}\build
run: |
.\install\bin\CalendarApp.exe ^
-f "${{github.workspace}}\build\update_windows.json" ^
-f "${{github.workspace}}\build\update_windows_${{matrix.qt_version}}.json" ^
--foc 1 ^
--pf ${{github.workspace}}\build\Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe ^
-m "${{env.Calendar_VERSION}}" ^
Expand All @@ -155,4 +163,5 @@ jobs:
name: ${{ env.artifact_name }}
path: |
${{github.workspace}}\build\Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe
${{github.workspace}}\build\update_windows.xml
${{github.workspace}}\build\update_windows_${{matrix.qt_version}}.json
${{github.workspace}}\build\update_windows_${{matrix.qt_version}}.json.xml
23 changes: 18 additions & 5 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
- name: Install apt packages
run: |
sudo apt update
sudo apt upgrade
sudo apt install xvfb xpra \
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y xvfb xpra \
libglu1-mesa-dev libpulse-mainloop-glib0 \
cmake build-essential \
debhelper fakeroot graphviz \
Expand Down Expand Up @@ -79,7 +79,8 @@ jobs:
./build_debpackage.sh
cp ../rabbitcalendar_${{env.Calendar_VERSION}}_amd64.deb rabbitcalendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb
- name: Update xml file
- name: Update configure file
if: ${{ matrix.BUILD_TYPE == 'Release'}}
working-directory: ${{github.workspace}}
run: |
sudo Xvfb :99 -ac &
Expand All @@ -95,11 +96,23 @@ jobs:
-m "${{env.Calendar_VERSION}}" \
-u "https://github.com/KangLin/Calendar/releases/download/v${{env.Calendar_VERSION}}/rabbitcalendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb;https://sourceforge.net/projects/rabbitcalendar/files/v${{env.Calendar_VERSION}}/rabbitcalendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb"
- name: Update version configure file
if: ${{ matrix.BUILD_TYPE == 'Release'}}
working-directory: ${{github.workspace}}
run: |
sudo Xvfb :99 -ac &
export DISPLAY=:99.0
/opt/Calendar/bin/Calendar.sh \
-f "${{github.workspace}}/version.json" \
--foc 0
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: |
${{github.workspace}}/rabbitcalendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb
${{github.workspace}}/update_linux.xml
${{github.workspace}}/update_ubuntu.json.xml
${{github.workspace}}/update_ubuntu.json
${{github.workspace}}/version.json
3 changes: 0 additions & 3 deletions App/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ LIST(APPEND PRIVATE_DEFINITIONS
Calendar_VERSION="${Calendar_VERSION}"
BUILD_ARCH="${BUILD_ARCH}"
BUILD_PLATFORM="${BUILD_PLATFORM}")
if(NOT TARGET RabbitCommon)
message(FATAL_ERROR "----------------------------------------------")
endif()
ADD_TARGET(NAME ${PROJECT_NAME}
ISEXE
ISWINDOWS
Expand Down

0 comments on commit 94cf626

Please sign in to comment.