Fixed warnings from Github CI.

This commit is contained in:
23rd 2020-10-25 04:46:27 +03:00 committed by John Preston
parent 1a2afda09c
commit 3883a268c7
5 changed files with 50 additions and 63 deletions

View File

@ -12,7 +12,7 @@ jobs:
run: |
tag=$(git ls-remote --tags git://github.com/$GITHUB_REPOSITORY | cut -f 2 | tail -n1)
echo $tag
echo ::set-env name=LATEST_TAG::$tag
echo "LATEST_TAG=$tag" >> $GITHUB_ENV
- name: Get the latest macOS version.
shell: python
@ -28,7 +28,7 @@ jobs:
ver = itemlist[0].attributes['sparkle:shortVersionString'].value;
print(ver);
subprocess.check_call("echo ::set-env name=%s::%s" % ("LATEST_MACOS", ver), shell=True);
open(os.environ['GITHUB_ENV'], "a").write("LATEST_MACOS=" + ver);
- name: Check a version from an issue.
uses: actions/github-script@0.4.0

View File

@ -71,7 +71,7 @@ jobs:
steps:
- name: Get repository name.
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Disable man for further package installs.
run: |
@ -129,11 +129,11 @@ jobs:
echo `md5sum $thisFile | cut -c -32` >> CACHE_KEY.txt
fi
md5cache=$(md5sum CACHE_KEY.txt | cut -c -32)
echo ::set-env name=CACHE_KEY::$md5cache
echo "CACHE_KEY=$md5cache" >> $GITHUB_ENV
mkdir -p Libraries
cd Libraries
echo ::set-env name=LibrariesPath::`pwd`
echo "LibrariesPath=`pwd`" >> $GITHUB_ENV
- name: Patches.
run: |
@ -556,9 +556,9 @@ jobs:
if [ -n "${{ matrix.defines }}" ]; then
DEFINE="-D ${{ matrix.defines }}=ON"
echo Define from matrix: $DEFINE
echo ::set-env name=ARTIFACT_NAME::Telegram_${{ matrix.defines }}
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV
else
echo ::set-env name=ARTIFACT_NAME::Telegram
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
fi
./configure.sh \

View File

@ -69,7 +69,7 @@ jobs:
steps:
- name: Get repository name.
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Clone.
uses: actions/checkout@v2
@ -94,13 +94,13 @@ jobs:
thisFile=$REPO_NAME/.github/workflows/mac.yml
echo `md5 -q $thisFile` >> CACHE_KEY.txt
fi
echo ::set-env name=CACHE_KEY::`md5 -q CACHE_KEY.txt`
echo "CACHE_KEY=`md5 -q CACHE_KEY.txt`" >> $GITHUB_ENV
echo ::add-path::$PWD/Libraries/depot_tools
echo "$PWD/Libraries/depot_tools" >> $GITHUB_PATH
mkdir -p Libraries/macos
cd Libraries/macos
echo ::set-env name=LibrariesPath::`pwd`
echo "LibrariesPath=`pwd`" >> $GITHUB_ENV
- name: Patches.
run: |
@ -490,9 +490,9 @@ jobs:
if [ -n "${{ matrix.defines }}" ]; then
DEFINE="-D ${{ matrix.defines }}=ON"
echo Define from matrix: $DEFINE
echo ::set-env name=ARTIFACT_NAME::Telegram_${{ matrix.defines }}
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV
else
echo ::set-env name=ARTIFACT_NAME::Telegram
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
fi
./configure.sh \

View File

@ -76,7 +76,7 @@ jobs:
if: env.UPLOAD_ARTIFACT == 'true'
run: |
artifact_name=$(echo telegram-desktop_*.snap)
echo ::set-env name=ARTIFACT_NAME::$artifact_name
echo "ARTIFACT_NAME=$artifact_name" >> $GITHUB_ENV
mkdir artifact
mv $artifact_name artifact

View File

@ -68,10 +68,31 @@ jobs:
DOC_PATH: "docs/building-msvc.md"
AUTO_CACHING: "1"
defaults:
run:
shell: cmd
steps:
- name: Get repository name.
shell: bash
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Set up environment paths.
shell: bash
run: |
echo "C:\\Strawberry\\perl\\bin\\" >> $GITHUB_PATH
echo "C:\\Program Files\\NASM\\" >> $GITHUB_PATH
echo "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\" >> $GITHUB_PATH
mkdir Libraries && cd Libraries
echo "Convert unix path to win path."
p=`pwd | sed 's#^/[d]#d:#g' |sed 's#/#\\\\#g'`
echo "LibrariesPath=$p" >> $GITHUB_ENV
- name: Save msbuild version.
run: |
call vcvars32.bat
msbuild -version > CACHE_KEY.txt
- name: Clone.
uses: actions/checkout@v2
@ -79,38 +100,18 @@ jobs:
submodules: recursive
path: ${{ env.REPO_NAME }}
- name: Set up environment variables.
shell: cmd
run: |
echo ::add-path::C:\Strawberry\perl\bin\
echo ::add-path::"%programfiles%\NASM"
C:
cd "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\"
echo ::add-path::%cd%
call vcvars32.bat
D:
cd %GITHUB_WORKSPACE%
msbuild -version > CACHE_KEY.txt
echo %MANUAL_CACHING% >> CACHE_KEY.txt
mkdir Libraries
cd Libraries
echo ::set-env name=LibrariesPath::%cd%
- name: Generate cache key.
shell: bash
run: |
echo $MANUAL_CACHING >> CACHE_KEY.txt
if [ "$AUTO_CACHING" == "1" ]; then
thisFile=$REPO_NAME/.github/workflows/win.yml
echo `md5sum $thisFile | awk '{ print $1 }'` >> CACHE_KEY.txt
fi
echo ::set-env name=CACHE_KEY::`md5sum CACHE_KEY.txt | awk '{ print $1 }'`
echo "CACHE_KEY=`md5sum CACHE_KEY.txt | awk '{ print $1 }'`" >> $GITHUB_ENV
- name: Choco installs.
run: |
choco install --no-progress -y nasm yasm jom ninja
run: choco install --no-progress -y nasm yasm jom ninja
- name: Patches.
shell: bash
@ -123,21 +124,18 @@ jobs:
eval $checkoutCommit
- name: Find any version of Python 2.
shell: cmd
shell: bash
run: |
echo Find any version of Python 2.
for /D %%a in (C:\hostedtoolcache\windows\Python\2.*) do (
SET PY2=%%a\x64
)
if [%PY2%] == [] (
echo Python 2 is not found.
echo "Find any version of Python 2."
p=`ls /c/hostedtoolcache/windows/python | grep 2 | tail -1`
if [ -z "$p" ]; then
echo "Python 2 is not found."
exit 1
)
echo Found %PY2%.
echo ::set-env name=PY2::%PY2%
fi
echo "PY2=C:\\hostedtoolcache\\windows\\Python\\$p\\x64" >> $GITHUB_ENV
echo "Found $p."
- name: LZMA.
shell: cmd
run: |
%VC%
@ -154,7 +152,6 @@ jobs:
key: ${{ runner.OS }}-${{ env.CACHE_KEY }}-${{ env.OPENSSL_VER }}
- name: OpenSSL.
if: steps.cache-openssl.outputs.cache-hit != 'true'
shell: cmd
run: |
%VC%
@ -180,7 +177,6 @@ jobs:
rmdir /S /Q .git
- name: Zlib.
shell: cmd
run: |
%VC%
@ -197,7 +193,6 @@ jobs:
path: ${{ env.LibrariesPath }}/openal-soft
key: ${{ runner.OS }}-openal-soft-${{ env.CACHE_KEY }}
- name: OpenAL Soft.
shell: cmd
if: steps.cache-openal.outputs.cache-hit != 'true'
run: |
%VC%
@ -225,7 +220,6 @@ jobs:
env:
GYP_MSVS_OVERRIDE_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\'
GYP_MSVS_VERSION: 2019
shell: cmd
if: steps.cache-breakpad.outputs.cache-hit != 'true'
run: |
cd %LibrariesPath%
@ -262,7 +256,6 @@ jobs:
key: ${{ runner.OS }}-opus-${{ env.CACHE_KEY }}
- name: Opus.
if: steps.cache-opus.outputs.cache-hit != 'true'
shell: cmd
run: |
%VC%
@ -281,7 +274,6 @@ jobs:
key: ${{ runner.OS }}-ffmpeg-${{ env.CACHE_KEY }}-2-${{ hashFiles('**/build_ffmpeg_win.sh') }}
- name: FFmpeg.
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
shell: cmd
run: |
%VC%
choco install --no-progress -y msys2
@ -303,7 +295,6 @@ jobs:
key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qtbase_5_12_8/*') }}
- name: Configure Qt 5.12.8.
if: steps.cache-qt.outputs.cache-hit != 'true'
shell: cmd
run: |
%VC%
@ -338,7 +329,6 @@ jobs:
-platform win32-msvc
- name: Qt 5.12.8 build.
if: steps.cache-qt.outputs.cache-hit != 'true'
shell: cmd
run: |
%VC%
cd qt_%QT%
@ -357,7 +347,6 @@ jobs:
key: ${{ runner.OS }}-webrtc-${{ env.CACHE_KEY }}
- name: WebRTC.
if: steps.cache-webrtc.outputs.cache-hit != 'true'
shell: cmd
run: |
%VC%
@ -407,15 +396,14 @@ jobs:
if [ -n "${{ matrix.defines }}" ]; then
DEFINE="-D ${{ matrix.defines }}=ON"
echo Define from matrix: $DEFINE
echo ::set-env name=ARTIFACT_NAME::Telegram_${{ matrix.defines }}
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV
else
echo ::set-env name=ARTIFACT_NAME::Telegram
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
fi
echo "::set-env name=TDESKTOP_BUILD_DEFINE::$DEFINE"
echo "TDESKTOP_BUILD_DEFINE=$DEFINE" >> $GITHUB_ENV
- name: Telegram Desktop build.
if: env.ONLY_CACHE == 'false'
shell: cmd
run: |
cd %REPO_NAME%\Telegram
@ -432,7 +420,6 @@ jobs:
- name: Move artifact.
if: env.UPLOAD_ARTIFACT == 'true'
shell: cmd
run: |
cd %REPO_NAME%\out\Debug
mkdir artifact