serial: 更新 burner_6 v2.3.3 #376
Workflow file for this run
This file contains 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: build | |
on: | |
push: | |
branches: '*' | |
tags: 'v*.*' | |
pull_request: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- { name: linux-x64, image: debian, platform: linux/amd64 } | |
- { name: linux-arm, image: debian, platform: linux/arm/v7 } | |
- { name: linux-arm64, image: debian, platform: linux/arm64 } | |
- { name: linux-arm-musl, image: alpine, platform: linux/arm/v7 } | |
- { name: linux-arm64-musl, image: alpine, platform: linux/arm64 } | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2.1.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Prepare builder image | |
uses: docker/build-push-action@v3 | |
with: | |
platforms: ${{ matrix.platform }} | |
file: .github/Dockerfile.${{ matrix.image }} | |
context: .github | |
tags: cskburn-${{ matrix.name }}:latest | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Build | |
uses: tj-actions/docker-run@v2 | |
with: | |
image: cskburn-${{ matrix.name }}:latest | |
name: ${{ matrix.name }} | |
options: >- | |
--platform ${{ matrix.platform }} | |
--volume ${{ github.workspace }}:/cskburn | |
--workdir /cskburn | |
args: | | |
bash -c ' | |
git config --global --add safe.directory $PWD | |
cmake -G Ninja -B build | |
cmake --build build --config Release | |
' | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cskburn-${{ matrix.name }} | |
path: build/cskburn/cskburn | |
if-no-files-found: error | |
- name: Upload release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: ./.github/actions/release-tar-xz | |
with: | |
name: cskburn-${{ matrix.name }}.tar.xz | |
root-dir: build/cskburn | |
files: cskburn | |
tag: ${{ github.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build-darwin: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
include: | |
- { name: darwin-x64, target: x86_64-apple-macos } | |
- { name: darwin-arm64, target: arm64-apple-macos } | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Setup Ninja | |
uses: ashutoshvarma/setup-ninja@master | |
- name: Build | |
uses: ./.github/actions/cmake-build | |
env: | |
CFLAGS: -target ${{ matrix.target }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cskburn-${{ matrix.name }} | |
path: build/cskburn/cskburn | |
if-no-files-found: error | |
- name: Upload release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: ./.github/actions/release-tar-xz | |
with: | |
name: cskburn-${{ matrix.name }}.tar.xz | |
root-dir: build/cskburn | |
files: cskburn | |
tag: ${{ github.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build-win32: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- { name: win32-x64, os: windows-latest } | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Setup MinGW-w64 | |
id: setup-mingw64 | |
uses: ./.github/actions/setup-mingw64 | |
with: | |
install: >- | |
git | |
zip | |
mingw-w64-x86_64-toolchain | |
mingw-w64-x86_64-cmake | |
mingw-w64-x86_64-ninja | |
- name: Build | |
uses: ./.github/actions/cmake-build | |
with: | |
run-tests: true | |
shell: ${{ steps.setup-mingw64.outputs.shell }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cskburn-${{ matrix.name }} | |
path: build/cskburn/cskburn.exe | |
if-no-files-found: error | |
- name: Upload release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: ./.github/actions/release-zip | |
with: | |
shell: ${{ steps.setup-mingw64.outputs.shell }} | |
name: cskburn-${{ matrix.name }}.zip | |
root-dir: build/cskburn | |
files: cskburn.exe | |
tag: ${{ github.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build-android: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- { name: android-armeabi-v7a, abi: armeabi-v7a } | |
- { name: android-arm64-v8a, abi: arm64-v8a } | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Setup Ninja | |
uses: ashutoshvarma/setup-ninja@master | |
- name: Setup NDK | |
id: setup-ndk | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r21e | |
- name: Build | |
uses: ./.github/actions/cmake-build | |
with: | |
build-args: >- | |
-DCMAKE_SYSTEM_NAME=Android | |
-DCMAKE_ANDROID_ARCH_ABI=${{ matrix.abi }} | |
-DCMAKE_ANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cskburn-android-${{ matrix.abi }} | |
path: build/cskburn/cskburn | |
if-no-files-found: error | |
- name: Upload release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: ./.github/actions/release-tar-xz | |
with: | |
name: cskburn-${{ matrix.name }}.tar.xz | |
root-dir: build/cskburn | |
files: cskburn | |
tag: ${{ github.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} |