Fix syntax
This commit is contained in:
parent
3b8c212bee
commit
80c663e377
81
.github/workflows/natives.yaml
vendored
81
.github/workflows/natives.yaml
vendored
@ -12,43 +12,29 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/386", implementation: "tdlight"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/386", implementation: "tdlight"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/386", implementation: "tdlib"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/386", implementation: "tdlib"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/amd64", implementation: "tdlight"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/amd64", implementation: "tdlight"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/amd64", implementation: "tdlib"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/amd64", implementation: "tdlib"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/arm/v6", implementation: "tdlight"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/arm/v6", implementation: "tdlight"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/arm/v6", implementation: "tdlib"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/arm/v6", implementation: "tdlib"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/arm/v7", implementation: "tdlight"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/arm/v7", implementation: "tdlight"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/arm/v7", implementation: "tdlib"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/arm/v7", implementation: "tdlib"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/arm64", implementation: "tdlight"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/arm64", implementation: "tdlight"}
|
||||||
- {os: ubuntu-20.04, usedocker: true, arch: "linux/arm64", implementation: "tdlib"}
|
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/arm64", implementation: "tdlib"}
|
||||||
- {os: windows-2019, usedocker: false, arch: "amd64", implementation: "tdlight"}
|
- {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlight"}
|
||||||
- {os: windows-2019, usedocker: false, arch: "amd64", implementation: "tdlib"}
|
- {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlib"}
|
||||||
- {os: macos-10.15, usedocker: false, arch: "amd64", implementation: "tdlight"}
|
- {os: macos-10.15, usedocker: "false", arch: "amd64", implementation: "tdlight"}
|
||||||
- {os: macos-10.15, usedocker: false, arch: "amd64", implementation: "tdlib"}
|
- {os: macos-10.15, usedocker: "false", arch: "amd64", implementation: "tdlib"}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout current repo
|
- name: Checkout current repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
- name: Setup Java (Snapshot)
|
|
||||||
if: github.ref != 'refs/heads/master'
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
server-id: mchv-snapshot-distribution
|
|
||||||
server-username: MAVEN_USERNAME
|
|
||||||
server-password: MAVEN_PASSWORD
|
|
||||||
- name: Setup Java (Release)
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
server-id: mchv-release-distribution
|
|
||||||
server-username: MAVEN_USERNAME
|
|
||||||
server-password: MAVEN_PASSWORD
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
if: matrix.usedocker
|
if: matrix.usedocker == 'true'
|
||||||
run: |
|
run: |
|
||||||
# Get latest commit short hash
|
# Get latest commit short hash
|
||||||
HASH_VERSION=$(git rev-parse --short HEAD)
|
HASH_VERSION=$(git rev-parse --short HEAD)
|
||||||
@ -81,15 +67,15 @@ jobs:
|
|||||||
cat $GITHUB_ENV > github.env
|
cat $GITHUB_ENV > github.env
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
if: matrix.usedocker
|
if: matrix.usedocker == 'true'
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: matrix.usedocker
|
if: matrix.usedocker == 'true'
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- name: Cache Docker layers
|
- name: Cache Docker layers
|
||||||
if: matrix.usedocker
|
if: matrix.usedocker == 'true'
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
path: /tmp/.buildx-cache
|
||||||
@ -98,7 +84,7 @@ jobs:
|
|||||||
${{ runner.os }}-buildx-${{ env.SAFE_ARCH }}-
|
${{ runner.os }}-buildx-${{ env.SAFE_ARCH }}-
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
if: matrix.usedocker
|
if: matrix.usedocker == 'true'
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@ -117,14 +103,29 @@ jobs:
|
|||||||
IMPLEMENTATION_NAME=${{ matrix.implementation }}
|
IMPLEMENTATION_NAME=${{ matrix.implementation }}
|
||||||
|
|
||||||
- name: Extract jni from docker image
|
- name: Extract jni from docker image
|
||||||
if: matrix.usedocker
|
if: matrix.usedocker == 'true'
|
||||||
run: |
|
run: |
|
||||||
mkdir generated
|
mkdir generated
|
||||||
docker cp $(docker create tdlight-java-natives:${{ env.HASH_VERSION }}-${{ env.SAFE_ARCH }}):/usr/src/tdlight-java-natives/generated/. ./generated/.
|
docker cp $(docker create tdlight-java-natives:${{ env.HASH_VERSION }}-${{ env.SAFE_ARCH }}):/usr/src/tdlight-java-natives/generated/. ./generated/.
|
||||||
|
|
||||||
|
- name: Setup Java (Snapshot)
|
||||||
|
if: github.ref == 'refs/heads/develop' && matrix.usedocker == 'false'
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
server-id: mchv-snapshot-distribution
|
||||||
|
server-username: MAVEN_USERNAME
|
||||||
|
server-password: MAVEN_PASSWORD
|
||||||
|
- name: Setup Java (Release)
|
||||||
|
if: github.ref == 'refs/heads/master' && matrix.usedocker == 'false'
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
server-id: mchv-release-distribution
|
||||||
|
server-username: MAVEN_USERNAME
|
||||||
|
server-password: MAVEN_PASSWORD
|
||||||
- name: Setup variables
|
- name: Setup variables
|
||||||
if: !matrix.usedocker
|
if: matrix.usedocker == 'false'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# ====== Variables
|
# ====== Variables
|
||||||
@ -163,14 +164,14 @@ jobs:
|
|||||||
echo "SRC_TDJNI_LIBNAME=$SRC_TDJNI_LIBNAME" >> $GITHUB_ENV
|
echo "SRC_TDJNI_LIBNAME=$SRC_TDJNI_LIBNAME" >> $GITHUB_ENV
|
||||||
echo "DEST_TDJNI_LIBNAME=$DEST_TDJNI_LIBNAME" >> $GITHUB_ENV
|
echo "DEST_TDJNI_LIBNAME=$DEST_TDJNI_LIBNAME" >> $GITHUB_ENV
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: !matrix.usedocker
|
if: matrix.usedocker == 'false'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "REVISION: $REVISION"
|
echo "REVISION: $REVISION"
|
||||||
|
|
||||||
source ./scripts/continuous-integration/github-workflows/install-dependencies.sh
|
source ./scripts/continuous-integration/github-workflows/install-dependencies.sh
|
||||||
- name: Build
|
- name: Build
|
||||||
if: !matrix.usedocker
|
if: matrix.usedocker == 'false'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "REVISION: $REVISION"
|
echo "REVISION: $REVISION"
|
||||||
|
Loading…
Reference in New Issue
Block a user