Skip to content

build, refactor: change amd64/i386 to x64/x86. #140

build, refactor: change amd64/i386 to x64/x86.

build, refactor: change amd64/i386 to x64/x86. #140

Workflow file for this run

name: Build/release
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- 'ci/**'
- 'ci-**'
- 'releases/**'
- 'dev'
- 'master'
- 'test_ci'
- 'feat/**'
tags:
- v0.*.*
- v1.*.*
pull_request:
branches:
- 'dev'
# release:
# # Only use the types keyword to narrow down the activity types that will trigger your workflow.
# types: [published, created, edited]
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
include:
- os: ubuntu-20.04
target_arch: x64
build_type: release
- os: ubuntu-20.04
target_arch: x64
build_type: debug
- os: ubuntu-20.04
target_arch: x86
build_type: release
- os: ubuntu-20.04
target_arch: x86
build_type: debug
- os: ubuntu-20.04
target_arch: arm64
build_type: release
- os: ubuntu-20.04
target_arch: arm64
build_type: debug
- os: ubuntu-20.04
target_arch: arm
build_type: release
- os: ubuntu-20.04
target_arch: arm
build_type: debug
- os: ubuntu-20.04
target_arch: mips64
build_type: release
- os: ubuntu-20.04
target_arch: mips64
build_type: debug
- os: ubuntu-20.04
target_arch: ppc64
build_type: release
- os: ubuntu-20.04
target_arch: ppc64
build_type: debug
- os: ubuntu-20.04
target_arch: riscv64
build_type: release
- os: ubuntu-20.04
target_arch: riscv64
build_type: debug
- os: ubuntu-20.04
target_arch: loong64
build_type: release
- os: ubuntu-20.04
target_arch: loong64
build_type: debug
- os: ubuntu-20.04
build_target: alpine
target_arch: x64
build_type: release
- os: ubuntu-20.04
build_target: alpine
target_arch: x86
build_type: release
- os: ubuntu-20.04
build_target: alpine
target_arch: arm64
build_type: release
- os: ubuntu-20.04
build_target: android
target_arch: x64
build_type: release
- os: ubuntu-20.04
build_target: android
target_arch: x86
build_type: release
- os: ubuntu-20.04
build_target: android
target_arch: arm64
build_type: release
- os: ubuntu-20.04
build_target: android
target_arch: arm
build_type: release
- os: windows-2022
target_arch: x64
build_type: release
- os: windows-2022
target_arch: x64
build_type: debug
- os: windows-2022
target_arch: x86
build_type: release
- os: windows-2022
target_arch: x86
build_type: debug
- os: windows-2022
target_arch: arm64
build_type: release
- os: windows-2022
target_arch: arm64
build_type: debug
- os: macos-11
target_arch: x64
build_type: release
- os: macos-11
target_arch: x64
build_type: debug
- os: macos-11
target_arch: arm64
build_type: release
- os: macos-11
target_arch: arm64
build_type: debug
- os: macos-11
build_target: iphone
target_arch: arm64
build_type: release
- os: macos-11
build_target: iphone
target_arch: x64
build_type: release
steps:
- name: Switch XCode to 13.0
uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
xcode-version: '13.0'
- name: Check out Git repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set Env Variables
id: set-env-vars
shell: bash
run: |
bash .github/workflows/set-env-vars.sh
env:
TARGET_ARCH: ${{ matrix.target_arch }}
BUILD_TYPE: ${{ matrix.build_type }}
BUILD_TARGET: ${{ matrix.build_target }}
- name: Setup ubuntu
if: runner.os == 'Linux'
shell: bash
run: |
bash .github/workflows/setup_ubuntu.sh
env:
TARGET_ARCH: ${{ matrix.target_arch }}
BUILD_TARGET: ${{ matrix.build_target }}
- name: Build
shell: bash
run: |
bash .github/workflows/build.sh
env:
TARGET_ARCH: ${{ matrix.target_arch }}
BUILD_TYPE: ${{ matrix.build_type }}
BUILD_TARGET: ${{ matrix.build_target }}
- name: Package
shell: bash
run: |
bash .github/workflows/pack.sh
env:
RELEASE_TAG: ${{ steps.set-env-vars.outputs.RELEASE_TAG }}
TARGET_OS: ${{ steps.set-env-vars.outputs.TARGET_OS }}
DIST_FILE: ${{ steps.set-env-vars.outputs.DIST_FILE }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: ${{ steps.set-env-vars.outputs.IS_UPLOAD_ASSETS != '' && steps.set-env-vars.outputs.TAG_EXISTED == '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
with:
tag_name: ${{ steps.set-env-vars.outputs.RELEASE_TAG }}
release_name: Release ${{ steps.set-env-vars.outputs.RELEASE_TAG }}
body: ${{ steps.set-env-vars.outputs.GIT_COMMIT_HEAD_MSG }}
draft: false
prerelease: true
- name: Github Release
id: upload-release-asset
uses: softprops/action-gh-release@v1
if: ${{ steps.set-env-vars.outputs.IS_UPLOAD_ASSETS != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: ${{ steps.set-env-vars.outputs.GIT_COMMIT_HEAD_MSG }}
draft: false
prerelease: true
files: ${{ steps.set-env-vars.outputs.DIST_FILEPATH }}
name: Release ${{ steps.set-env-vars.outputs.RELEASE_TAG }}
tag_name: ${{ steps.set-env-vars.outputs.RELEASE_TAG }}
- name: Test jssdk
id: test-jssdk
shell: bash
run: |
bash .github/workflows/jssdk_test.sh
env:
DIST_DIR: ${{ steps.set-env-vars.outputs.DIST_DIR }}
TARGET_OS_NAME: ${{ steps.set-env-vars.outputs.TARGET_OS_NAME }}
TARGET_ARCH: ${{ matrix.target_arch }}
BUILD_TYPE: ${{ matrix.build_type }}
BUILD_TARGET: ${{ matrix.build_target }}