feat: update ten_gn #2
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 - linux arm64 | |
on: | |
release: | |
types: [created] | |
push: | |
branches: | |
- "**" | |
paths-ignore: | |
- "tools/**" | |
- "docs/**" | |
- ".vscode/**" | |
- ".devcontainer/**" | |
- ".github/**" | |
- "!.github/workflows/build_linux_arm64.yml" | |
- "**.md" | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
compiler: [clang, gcc] | |
build_type: [release] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
submodules: "true" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build | |
run: | | |
docker run --rm --platform linux/arm64 \ | |
-v $(pwd):/${{ github.workspace }} -w ${{ github.workspace }} \ | |
ghcr.io/wangyoucao577/ten_building_ubuntu2204:feature-arm64 \ | |
bash -c "\ | |
export PATH=$(pwd)/core/ten_gn:/usr/local/go/bin:/root/go/bin:/root/.cargo/bin:$PATH && \ | |
echo $PATH && \ | |
go env -w GOFLAGS="-buildvcs=false" && \ | |
go1.20.12 download && \ | |
rustup default nightly && \ | |
tgn gen linux arm64 ${{ matrix.build_type }} -- is_clang=${{ matrix.compiler == 'gcc' && 'false' || 'true' }} log_level=1 enable_serialized_actions=true ten_enable_test=false ten_enable_libwebsockets=false && \ | |
tgn build linux arm64 ${{ matrix.build_type }} && \ | |
tree -I 'gen|obj' out \ | |
" | |
- name: Upload tman | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tman-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }} | |
path: out/linux/arm64/ten_manager/bin/tman | |
- name: Upload ten_packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ten_packages-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }} | |
path: | | |
out/linux/arm64/ten_packages/system | |
out/linux/arm64/ten_packages/extension_group | |
out/linux/arm64/ten_packages/extension/default_extension_cpp | |
out/linux/arm64/ten_packages/extension/default_extension_go | |
out/linux/arm64/ten_packages/extension/default_extension_python | |
out/linux/arm64/ten_packages/extension/py_init_extension_cpp | |
- name: Package assets | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
cd out/linux/arm64 | |
zip -vr tman-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip ten_manager/bin/tman | |
zip -vr ten_packages-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip \ | |
ten_packages/system \ | |
ten_packages/extension_group \ | |
ten_packages/extension/default_extension_cpp \ | |
ten_packages/extension/default_extension_go \ | |
ten_packages/extension/default_extension_python \ | |
ten_packages/extension/py_init_extension_cpp | |
- name: Release assets | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
out/linux/arm64/tman-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip | |
out/linux/arm64/ten_packages-linux-arm64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip |