Build release VC #227
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
| # 2026-05-14 # 2026-03-01 # 2026-02-01 # 2025-07-02 07:30 # 2024-09-02 00:40 | |
| # far.sln, source archive # copy files from extra folder, soft_fast_search patch | |
| name: Build release VC | |
| on: | |
| # push: | |
| # branches: [ master ] | |
| # pull_request: | |
| # branches: [ master ] | |
| workflow_dispatch: | |
| inputs: | |
| msbuild-debug-codeql: | |
| default: false | |
| type: boolean | |
| extra_plugins_profile: | |
| default: true | |
| type: boolean | |
| code-style-checks: | |
| default: true | |
| type: boolean | |
| hlf-checks: | |
| default: true | |
| type: boolean | |
| msbuild_cl_x64_release_input: | |
| default: true | |
| type: boolean | |
| msbuild_cl_x86_release_input: | |
| default: true | |
| type: boolean | |
| msbuild_cl_ARM64_release_input: | |
| default: true | |
| type: boolean | |
| soft_fast_search_patch: | |
| default: true | |
| type: boolean | |
| env: | |
| PROG_NAME: "Far3" | |
| TAG_NAME: "Far3" | |
| Far_version: "3.0." | |
| jobs: | |
| #------------------------------------------------------------------------------ | |
| code-style-checks: | |
| runs-on: ubuntu-latest | |
| if: ${{ inputs.code-style-checks }} | |
| steps: | |
| - name: Checkout source | |
| uses: deep-soft/checkout@v6 | |
| - name: Setup Python | |
| uses: deep-soft/setup-python@v6 | |
| - name: Run checks | |
| working-directory: far | |
| run: python tools/source_validator.py | |
| #------------------------------------------------------------------------------ | |
| hlf-checks: | |
| runs-on: windows-2025-vs2026 | |
| if: ${{ inputs.hlf-checks }} | |
| steps: | |
| - name: Checkout source | |
| uses: deep-soft/checkout@v6 | |
| - uses: deep-soft/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '6.0' | |
| # For "--property UseSharedCompilation=false", see | |
| # https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#no-code-found-during-the-build | |
| - name: Build and run ChangelogChecker | |
| working-directory: misc/build-checks/ChangelogChecker | |
| run: dotnet run --project ./ChangelogChecker.csproj --configuration Release --property UseSharedCompilation=false | |
| - name: Build and run HlfChecker | |
| working-directory: misc/build-checks/HlfChecker | |
| run: dotnet run --project ./HlfChecker.csproj --configuration Release --property UseSharedCompilation=false -- Verbose | |
| #------------------------------------------------------------------------------ | |
| msbuild-debug-codeql: | |
| runs-on: windows-2025-vs2026 | |
| if: ${{ inputs.msbuild-debug-codeql }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build: [ | |
| # msbuild_cl_x64_release, | |
| # msbuild_cl_x86_release, | |
| # msbuild_cl_ARM64_release, | |
| msbuild_cl_x64_debug, | |
| # msbuild_cl_x86_debug, | |
| ] | |
| include: | |
| # - { build: msbuild_cl_x64_release, compiler: msbuild_cl, arch: amd64, platform_sln: x64, platform_name: x64, build_config: Release } | |
| # - { build: msbuild_cl_x86_release, compiler: msbuild_cl, arch: amd64_x86, platform_sln: Win32, platform_name: x86, build_config: Release } | |
| # - { build: msbuild_cl_ARM64_release, compiler: msbuild_cl, arch: amd64_arm64, platform_sln: ARM64, platform_name: ARM64, build_config: Release } | |
| - { build: msbuild_cl_x64_debug, compiler: msbuild_cl, arch: amd64, platform_sln: x64, platform_name: x64, build_config: Debug } | |
| # - { build: msbuild_cl_x86_debug, compiler: msbuild_cl, arch: amd64_x86, platform_sln: Win32, platform_name: x86, build_config: Debug } | |
| # exclude: | |
| # - { build: msbuild_cl_x64_release }: ${{ inputs.msbuild_cl_x64_release_input != true }} | |
| # - { build: msbuild_cl_x86_release }: ${{ inputs.msbuild_cl_x86_release_input != true }} | |
| # - { build: msbuild_cl_ARM64_release }: ${{ inputs.msbuild_cl_ARM64_release_input != true }} | |
| steps: | |
| - name: test var | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| run: | | |
| echo " if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64'" | |
| - name: Checkout source | |
| uses: deep-soft/checkout@v6 | |
| - name: soft_fast_search_patch | |
| if: ${{ inputs.soft_fast_search_patch }} | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| ls -la patch/filelist.diff || true; | |
| if [[ -f patch/filelist.diff ]]; then | |
| git apply --verbose patch/filelist.diff | |
| fi | |
| - name: Get program version | |
| continue-on-error: false | |
| shell: bash | |
| run: | | |
| Far_version=${{ env.Far_Version}} | |
| Far_build=$(cat "far/vbuild.m4") | |
| echo $Far_version$Far_build | |
| echo "VERSION=$Far_version$Far_build.0" >> $GITHUB_ENV | |
| - name: Print program version | |
| continue-on-error: false | |
| shell: bash | |
| run: | | |
| echo "Print program version" | |
| echo ${{ env.VERSION }} | |
| - name: Initialize CodeQL | |
| # if: matrix.build == 'msbuild_cl_x64_debug' | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: cpp | |
| - name: Set MSVC environment | |
| uses: deep-soft/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| - name: Set environment for debug build | |
| # if: matrix.build_config == 'Debug' | |
| run: | | |
| Add-Content -Path $env:GITHUB_ENV -Value "DEBUG=1" | |
| - name: Build (cl) | |
| working-directory: _build/vc | |
| run: | | |
| msbuild -m /property:Configuration=${{ matrix.build_config }} /property:Platform=${{ matrix.platform_sln }} far`.sln | |
| - name: Perform CodeQL Analysis | |
| # if: matrix.build == 'msbuild_cl_x64_debug' | |
| uses: github/codeql-action/analyze@v3 | |
| #------------------------------------------------------------------------------ | |
| msbuild: | |
| runs-on: windows-2025-vs2026 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build: [ | |
| msbuild_cl_x64_release, | |
| msbuild_cl_x86_release, | |
| msbuild_cl_ARM64_release, | |
| # msbuild_cl_x64_debug, | |
| # msbuild_cl_x86_debug, | |
| ] | |
| include: | |
| - { build: msbuild_cl_x64_release, compiler: msbuild_cl, arch: amd64, platform_sln: x64, platform_name: x64, build_config: Release } | |
| - { build: msbuild_cl_x86_release, compiler: msbuild_cl, arch: amd64_x86, platform_sln: Win32, platform_name: x86, build_config: Release } | |
| - { build: msbuild_cl_ARM64_release, compiler: msbuild_cl, arch: amd64_arm64, platform_sln: ARM64, platform_name: ARM64, build_config: Release } | |
| # - { build: msbuild_cl_x64_debug, compiler: msbuild_cl, arch: amd64, platform_sln: x64, platform_name: x64, build_config: Debug } | |
| # - { build: msbuild_cl_x86_debug, compiler: msbuild_cl, arch: amd64_x86, platform_sln: Win32, platform_name: x86, build_config: Debug } | |
| # exclude: | |
| # - { build: msbuild_cl_x64_release }: ${{ inputs.msbuild_cl_x64_release_input != true }} | |
| # - { build: msbuild_cl_x86_release }: ${{ inputs.msbuild_cl_x86_release_input != true }} | |
| # - { build: msbuild_cl_ARM64_release }: ${{ inputs.msbuild_cl_ARM64_release_input != true }} | |
| steps: | |
| - name: test var | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| run: | | |
| echo " if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64'" | |
| - name: Checkout source | |
| uses: deep-soft/checkout@v6 | |
| - name: soft_fast_search_patch | |
| if: ${{ inputs.soft_fast_search_patch }} | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| ls -la patch/filelist.diff || true; | |
| if [[ -f patch/filelist.diff ]]; then | |
| git apply --verbose patch/filelist.diff | |
| fi | |
| - name: create source archive | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| run: | | |
| echo "create source archive"; | |
| - name: Create source archive | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| continue-on-error: true | |
| uses: deep-soft/zip-release@v3 | |
| with: | |
| type: 'tar.xz' | |
| filename: "${{ env.PROG_NAME }}-latest-src" | |
| directory: '.' | |
| exclusions: '.git/objects' | |
| recursive_exclusions: '.git/objects' | |
| path: '.' | |
| env_variable: ASSET_SRC | |
| # archive name is ${{ env.ZIP_RELEASE_ARCHIVE }} | |
| - name: Get program version | |
| continue-on-error: false | |
| shell: bash | |
| run: | | |
| Far_version=${{ env.Far_Version}} | |
| Far_build=$(cat "far/vbuild.m4") | |
| echo $Far_version$Far_build | |
| echo "VERSION=$Far_version$Far_build.0" >> $GITHUB_ENV | |
| - name: Print program version | |
| continue-on-error: false | |
| shell: bash | |
| run: | | |
| echo "Print program version" | |
| echo ${{ env.VERSION }} | |
| - name: Initialize CodeQL | |
| if: matrix.build == 'msbuild_cl_x64_debug' | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: cpp | |
| - name: Set MSVC environment | |
| uses: deep-soft/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| - name: Set environment for debug build | |
| if: matrix.build_config == 'Debug' | |
| run: | | |
| Add-Content -Path $env:GITHUB_ENV -Value "DEBUG=1" | |
| - name: Build (cl) | |
| working-directory: _build/vc | |
| run: | | |
| msbuild -m /property:Configuration=${{ matrix.build_config }} /property:Platform=${{ matrix.platform_sln }} far`.sln | |
| - name: Perform CodeQL Analysis | |
| if: matrix.build == 'msbuild_cl_x64_debug' | |
| uses: github/codeql-action/analyze@v3 | |
| # - name: Create zip | |
| # continue-on-error: true | |
| # working-directory: _build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }} | |
| # run: | | |
| # dir ./ | |
| # Compress-Archive . ../${{ env.PROG_NAME }}.${{ matrix.build_config }}.${{ matrix.platform_sln }}.${{ env.VERSION }}.zip | |
| # dir ../ | |
| - name: Add file from extra folder | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| pushd extra; | |
| rm -R ./Documentation/pol || true; | |
| rm -R ./Documentation/rus || true; | |
| cp -R * '../_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}' || true; | |
| popd; | |
| ls -la '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}' || true; | |
| - name: Add extra plugins NetBox | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| pushd '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}/Plugins'; | |
| for extra_plug in Far-NetBox ; do | |
| mkdir $extra_plug; | |
| cd $extra_plug; | |
| f_name="$extra_plug.${{ matrix.platform_name }}.7z"; | |
| curl -LOJ "https://github.com/deep-soft/$extra_plug/releases/download/$extra_plug-latest/$extra_plug.${{ matrix.platform_name }}.7z"; | |
| f_size=$(stat --format=%s $f_name); | |
| echo "f_size=$f_size"; | |
| min_f_size=1000000; | |
| if [[ f_size -le min_f_size ]]; then | |
| echo "something wrong"; | |
| f_name="$extra_plug.${{ matrix.platform_name }}-ok.7z"; | |
| curl -LOJ "https://github.com/deep-soft/$extra_plug/releases/download/$extra_plug-latest/$extra_plug.${{ matrix.platform_name }}-ok.7z"; | |
| f_size=$(stat --format=%s $f_name); | |
| echo "f_size=$f_size"; | |
| else | |
| echo "ok"; | |
| fi | |
| 7z x $extra_plug.${{ matrix.platform_name }}.7z; | |
| rm $extra_plug.${{ matrix.platform_name }}.7z; | |
| cd .. | |
| done | |
| popd | |
| - name: Add extra plugins Colorer | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| pushd '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}/Plugins'; | |
| for extra_plug in Far-Colorer ; do | |
| mkdir $extra_plug; | |
| cd $extra_plug; | |
| variant_ok=0; | |
| f_variant=".icu"; | |
| f_name="$extra_plug$f_variant.${{ matrix.platform_name }}.7z"; | |
| curl -LOJ "https://github.com/deep-soft/$extra_plug/releases/download/$extra_plug-latest/$f_name"; | |
| f_size=$(stat --format=%s $f_name); | |
| echo "f_size=$f_size"; | |
| min_f_size=1000000; | |
| if [[ f_size -le min_f_size ]]; then | |
| echo "something wrong: $f_variant"; | |
| variant_ok=0; | |
| else | |
| echo "ok: $f_variant"; | |
| variant_ok=1; | |
| fi | |
| if [[ variant_ok -eq 0 ]]; then | |
| f_name="$extra_plug.${{ matrix.platform_name }}.7z"; | |
| curl -LOJ "https://github.com/deep-soft/$extra_plug/releases/download/$extra_plug-latest/$f_name"; | |
| f_size=$(stat --format=%s $f_name); | |
| echo "f_size=$f_size"; | |
| min_f_size=1000000; | |
| if [[ f_size -le min_f_size ]]; then | |
| echo "something wrong"; | |
| f_name="$extra_plug.${{ matrix.platform_name }}-ok.7z"; | |
| curl -LOJ "https://github.com/deep-soft/$extra_plug/releases/download/$extra_plug-latest/$f_name"; | |
| f_size=$(stat --format=%s $f_name); | |
| echo "f_size=$f_size"; | |
| else | |
| echo "ok"; | |
| fi | |
| fi | |
| 7z x $f_name; | |
| rm $f_name; | |
| cd .. | |
| done | |
| popd | |
| - name: Sign Windows exe and dll files | |
| continue-on-error: true | |
| uses: deep-soft/code-sign-action@v11 | |
| with: | |
| certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}' | |
| password: '${{ secrets.WINDOWS_PFX_PASSWORD }}' | |
| certificatesha1: '${{ secrets.WINDOWS_PFX_SHA1_THUMBPRINT }}' | |
| # certificatename: '${{ secrets.CERTNAME }}' | |
| folder: '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}' | |
| recursive: true | |
| - name: Create Zip Archive Release | |
| if: matrix.build_config == 'Release' | |
| uses: deep-soft/zip-release@v2 | |
| with: | |
| type: 'zip' | |
| filename: '${{ env.PROG_NAME }}.${{ matrix.platform_sln }}.${{ env.VERSION }}.zip' | |
| directory: '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}' | |
| exclusions: '*.map *.pdb' | |
| recursive_exclusions: '*.map *.pdb changelog *Bel.lng *Cze.lng *Ger.lng *Hun.lng *Ita.lng *Lit.lng *Pol.lng *Por.lng *Rus.lng *Sky.lng *Spa.lng *Ukr* *Bel.hlf *Cze.hlf *Ger.hlf *Hun.hlf *Ita.hlf *Lit.hlf *Pol.hlf *Por.hlf *Rus.hlf *Sky.hlf *Spa.hlf *Ukr*' | |
| path: '.' | |
| - name: Upload zip | |
| if: matrix.build_config == 'Release' | |
| continue-on-error: true | |
| uses: deep-soft/upload-artifact@v7 | |
| with: | |
| name: ${{ env.PROG_NAME }}.${{ matrix.platform_name }}.${{ env.VERSION }}.zip | |
| #path: _build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}/${{ env.PROG_NAME }}.${{ matrix.build_config }}.${{ matrix.platform_sln }}.${{ env.VERSION }}.zip | |
| path: ${{ env.ZIP_RELEASE_ARCHIVE }} | |
| - name: Upload folder | |
| if: matrix.build_config == 'Debug' | |
| continue-on-error: true | |
| uses: deep-soft/upload-artifact@v7 | |
| with: | |
| name: ${{ env.PROG_NAME }}.${{ matrix.build_config }}.${{ matrix.platform_name }} | |
| path: _build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }} | |
| # - name: Create list file | |
| # continue-on-error: true | |
| # shell: bash | |
| # run: | | |
| # list_file="${{ env.PROG_NAME }}.${{ matrix.build }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.platform_sln }}-${{ matrix.platform_name }}-${{ matrix.build_config }}.txt" | |
| # ls -lR > $list_file | |
| # echo "LIST_File=$list_file" >> $GITHUB_ENV | |
| - name: Publish | |
| if: matrix.build_config == 'Release' | |
| continue-on-error: true | |
| uses: deep-soft/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ env.TAG_NAME }}-${{ env.VERSION }} | |
| # files: | | |
| # ${{ env.LIST_File }} | |
| files: | | |
| ${{ env.ZIP_RELEASE_ARCHIVE }} | |
| ${{ env.ASSET_SRC }} | |
| - name: Prepare latest Release | |
| if: matrix.build_config == 'Release' | |
| continue-on-error: false | |
| shell: bash | |
| run: | | |
| mv ${{ env.ZIP_RELEASE_ARCHIVE }} ${{ env.PROG_NAME }}.${{ matrix.platform_name }}.zip | |
| echo "${{ env.VERSION }}" > ${{ env.PROG_NAME }}-latest.txt | |
| - name: Publish latest Release | |
| if: matrix.build_config == 'Release' | |
| continue-on-error: false | |
| uses: deep-soft/action-gh-release@v3 | |
| with: | |
| draft: false | |
| tag_name: ${{ env.PROG_NAME }}-latest | |
| body: "${{ env.PROG_NAME }} latest: v${{ env.VERSION }}" | |
| files: | | |
| ${{ env.PROG_NAME }}.${{ matrix.platform_name }}.zip | |
| ${{ env.PROG_NAME }}-latest.txt | |
| ${{ env.ASSET_SRC }} | |
| # add extra plugins and Profile - begin | |
| # if: ${{ matrix.platform_sln == 'x64' && inputs.extra_plugins_profile == 'true' }} | |
| # if: ${{ inputs.extra_plugins_profile }} && ${{ matrix.platform_sln == 'x64' }} | |
| - name: extra - Add plugins and Profile | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| pushd '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}' | |
| curl -LOJ "https://github.com/deep-soft/DS-Progs/raw/main/bin/Far3-Plugins-Extra.zip" | |
| curl -LOJ "https://github.com/deep-soft/DS-Progs/raw/main/bin/Far3-Profile.zip" | |
| 7z x Far3-Plugins-Extra.zip | |
| 7z x Far3-Profile.zip | |
| rm Far3-Plugins-Extra.zip | |
| rm Far3-Profile.zip | |
| popd | |
| - name: extra - Sign Windows exe and dll files | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| continue-on-error: true | |
| uses: deep-soft/code-sign-action@v11 | |
| with: | |
| certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}' | |
| password: '${{ secrets.WINDOWS_PFX_PASSWORD }}' | |
| certificatesha1: '${{ secrets.WINDOWS_PFX_SHA1_THUMBPRINT }}' | |
| # certificatename: '${{ secrets.CERTNAME }}' | |
| folder: '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}' | |
| recursive: true | |
| - name: extra - Create Zip Archive Release | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| uses: deep-soft/zip-release@v2 | |
| with: | |
| type: 'zip' | |
| filename: '${{ env.PROG_NAME }}.${{ matrix.platform_sln }}.${{ env.VERSION }}-extra.zip' | |
| directory: '_build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}' | |
| exclusions: '*.map *.pdb' | |
| recursive_exclusions: '*.map *.pdb changelog *Bel.lng *Cze.lng *Ger.lng *Hun.lng *Ita.lng *Lit.lng *Pol.lng *Por.lng *Rus.lng *Sky.lng *Spa.lng *Ukr* *Bel.hlf *Cze.hlf *Ger.hlf *Hun.hlf *Ita.hlf *Lit.hlf *Pol.hlf *Por.hlf *Rus.hlf *Sky.hlf *Spa.hlf *Ukr*' | |
| path: '.' | |
| - name: extra - Publish | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| continue-on-error: true | |
| uses: deep-soft/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ env.TAG_NAME }}-${{ env.VERSION }} | |
| files: | | |
| ${{ env.ZIP_RELEASE_ARCHIVE }} | |
| - name: extra - Prepare latest Release | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| continue-on-error: false | |
| shell: bash | |
| run: | | |
| mv ${{ env.ZIP_RELEASE_ARCHIVE }} ${{ env.PROG_NAME }}.${{ matrix.platform_name }}-extra.zip | |
| echo "${{ env.VERSION }}" > ${{ env.PROG_NAME }}-extra-latest.txt | |
| - name: extra - Publish latest Release | |
| if: always() && inputs.extra_plugins_profile && matrix.platform_sln == 'x64' | |
| continue-on-error: false | |
| uses: deep-soft/action-gh-release@v3 | |
| with: | |
| draft: false | |
| tag_name: ${{ env.PROG_NAME }}-latest | |
| body: "${{ env.PROG_NAME }} latest: v${{ env.VERSION }}" | |
| files: | | |
| ${{ env.PROG_NAME }}.${{ matrix.platform_name }}-extra.zip | |
| ${{ env.PROG_NAME }}-extra-latest.txt | |
| # add extra plugins and Profile - end |