incomplete edit #1227
Workflow file for this run
This file contains hidden or 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: Commit CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - '*' | |
| tags: | |
| - '![0-9]+.*' | |
| paths: | |
| - '**/**' | |
| - '!*.md' | |
| - '!.gitignore' | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout last commit | |
| uses: actions/checkout@v4 | |
| - name: Install clang-format 18 | |
| run: | | |
| wget https://apt.llvm.org/llvm-snapshot.gpg.key | |
| sudo gpg --dearmor < llvm-snapshot.gpg.key > /usr/share/keyrings/llvm-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee /etc/apt/sources.list.d/llvm-toolchain-jammy-18.list | |
| sudo apt-get update | |
| sudo apt-get install -y clang-format-18 | |
| sudo ln -sf /usr/bin/clang-format-18 /usr/local/bin/clang-format | |
| clang-format --version | |
| - name: Code style lint | |
| shell: bash | |
| run: ./clang-format.sh -i | |
| build: | |
| needs: lint | |
| runs-on: windows-2022 | |
| env: | |
| boost_version: 1.84.0 | |
| BOOST_ROOT: ${{ github.workspace }}\deps\boost_1_84_0 | |
| steps: | |
| - name: Checkout last commit | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Fetch all tags | |
| run: git fetch --tags | |
| - name: Configure build environment | |
| shell: bash | |
| run: | | |
| cp env.vs2022.bat env.bat | |
| echo git_ref_name="$(git describe --always)" >> $GITHUB_ENV | |
| - name: Cache Boost | |
| id: cache-boost | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ env.BOOST_ROOT }} | |
| key: ${{ runner.os }}-boost-${{ env.boost_version }} | |
| - name: Install Boost | |
| if: steps.cache-boost.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| ./install_boost.bat | |
| ./build.bat boost arm64 | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| sdk: 10.0.19041.0 | |
| # bundled winsparkle v0.9.2 to disable auto open ReleaseNoteUrl in default browser | |
| - name: cache bundled winsparkle | |
| id: cache-winsparkle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}\winsparkle\x64\Release\WinSparkle.dll | |
| ${{ github.workspace }}\winsparkle\x64\Release\WinSparkle.lib | |
| ${{ github.workspace }}\winsparkle\Release\WinSparkle.dll | |
| ${{ github.workspace }}\winsparkle\Release\WinSparkle.lib | |
| key: winsparkle-v0.9.2-bundled | |
| - name: Build bundled winsparkle | |
| if: steps.cache-winsparkle.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| # Clone winsparkle repo v0.9.2 | |
| git clone https://github.com/vslavik/winsparkle.git -b v0.9.2 --depth 1 | |
| cd winsparkle | |
| git submodule update --init --recursive | |
| copy ..\bundled_winsparkle.patch . | |
| git apply bundled_winsparkle.patch | |
| nuget restore | |
| msbuild -m -t:Build -p:Configuration=Release -p:Platform=x64 WinSparkle.sln | |
| msbuild -m -t:Build -p:Configuration=Release -p:Platform=Win32 WinSparkle.sln | |
| - name: Install WinSparkle files | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| copy .\winsparkle\x64\Release\WinSparkle.dll .\output\ | |
| copy .\winsparkle\x64\Release\WinSparkle.lib .\lib64\ | |
| copy .\winsparkle\Release\WinSparkle.dll .\output\Win32\ | |
| copy .\winsparkle\Release\WinSparkle.lib .\lib\ | |
| - name: Get Rime files | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| .\get-rime.ps1 -use dev | |
| - name: Build data | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| .\build.bat data | |
| - name: Build Weasel | |
| shell: pwsh | |
| id: build_weasel | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| $env:SDKVER="10.0.19041.0" | |
| .\build.bat arm64 installer | |
| - name: Compress Debug Symbols | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| output\7z.exe a -t7z "./output/archives/debug_symbols.7z" "output/*.pdb" -r | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: weasel-artifact-${{ env.git_ref_name }} | |
| if-no-files-found: error | |
| path: | | |
| .\output\archives\weasel*.exe | |
| .\output\archives\debug_symbols.7z | |
| xbuild: | |
| needs: lint | |
| runs-on: windows-2022 | |
| env: | |
| boost_version: 1.84.0 | |
| BOOST_ROOT: ${{ github.workspace }}\deps\boost_1_84_0 | |
| steps: | |
| - name: Checkout last commit | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Fetch all tags | |
| run: git fetch --tags | |
| - name: Configure build environment | |
| shell: bash | |
| run: | | |
| cp env.vs2022.bat env.bat | |
| echo git_ref_name="$(git describe --always)" >> $GITHUB_ENV | |
| - name: Cache Boost | |
| id: cache-boost | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ env.BOOST_ROOT }} | |
| key: ${{ runner.os }}-boost-${{ env.boost_version }} | |
| - name: Install Boost | |
| if: steps.cache-boost.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| ./install_boost.bat | |
| ./build.bat boost arm64 | |
| # xmake 2.9.4 or later | |
| - uses: xmake-io/github-action-setup-xmake@v1 | |
| with: | |
| xmake-version: '2.9.4' | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| sdk: 10.0.19041.0 | |
| # bundled winsparkle v0.9.2 to disable auto open ReleaseNoteUrl in default browser | |
| - name: cache bundled winsparkle | |
| id: cache-winsparkle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}\winsparkle\x64\Release\WinSparkle.dll | |
| ${{ github.workspace }}\winsparkle\x64\Release\WinSparkle.lib | |
| ${{ github.workspace }}\winsparkle\Release\WinSparkle.dll | |
| ${{ github.workspace }}\winsparkle\Release\WinSparkle.lib | |
| key: winsparkle-v0.9.2-bundled | |
| - name: Build bundled winsparkle | |
| if: steps.cache-winsparkle.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| # Clone winsparkle repo v0.9.2 | |
| git clone https://github.com/vslavik/winsparkle.git -b v0.9.2 --depth 1 | |
| cd winsparkle | |
| git submodule update --init --recursive | |
| copy ..\bundled_winsparkle.patch . | |
| git apply bundled_winsparkle.patch | |
| nuget restore | |
| msbuild -m -t:Build -p:Configuration=Release -p:Platform=x64 WinSparkle.sln | |
| msbuild -m -t:Build -p:Configuration=Release -p:Platform=Win32 WinSparkle.sln | |
| - name: Install WinSparkle files | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| copy .\winsparkle\x64\Release\WinSparkle.dll .\output\ | |
| copy .\winsparkle\x64\Release\WinSparkle.lib .\lib64\ | |
| copy .\winsparkle\Release\WinSparkle.dll .\output\Win32\ | |
| copy .\winsparkle\Release\WinSparkle.lib .\lib\ | |
| - name: Get Rime files | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| .\get-rime.ps1 -use dev | |
| - name: Build data | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| .\build.bat data | |
| - name: Build Weasel | |
| id: build_weasel | |
| shell: cmd | |
| run: | | |
| set SDKVER=10.0.19041.0 | |
| .\xbuild.bat arm64 installer | |