mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-23 02:51:53 +08:00
82 lines
1.8 KiB
YAML
82 lines
1.8 KiB
YAML
# ---------------------------------------------------------------
|
||
# Workflow File : build-on-macOS.yml
|
||
# File Authors : 曾奥然 <ccmywish@qq.com>
|
||
# Contributors : Nul None <nul@none.org>
|
||
# |
|
||
# Created On : <2023-09-15>
|
||
# Last Modified : <2025-12-18>
|
||
#
|
||
# Build chsrc on macOS and upload it to GitHub: the 'pre' release
|
||
# ---------------------------------------------------------------
|
||
|
||
name: 构建于 macOS
|
||
on:
|
||
push:
|
||
branches: [ "gh-build" ]
|
||
|
||
jobs:
|
||
on-arm64:
|
||
runs-on: macos-latest
|
||
|
||
steps:
|
||
- name: 检出代码
|
||
uses: actions/checkout@v6
|
||
|
||
- name: 检查编译器版本
|
||
run: |
|
||
clang --version
|
||
echo
|
||
gcc --version
|
||
echo
|
||
gcc-14 --version
|
||
|
||
- name: 为 arm64 (AArch64) 构建
|
||
run: |
|
||
make build-in-ci-release-mode
|
||
mv chsrc-ci-release chsrc-aarch64-macos
|
||
|
||
- name: List files
|
||
run: ls *-macos
|
||
|
||
- name: 上传至 'pre' release
|
||
uses: softprops/action-gh-release@v2
|
||
# if: startsWith(github.ref, 'refs/tags/')
|
||
with:
|
||
tag_name: pre
|
||
files: |
|
||
chsrc-aarch64-macos
|
||
|
||
|
||
on-x64:
|
||
# macos-13 是 x64,macos-14 是 AArch64(ARMv8-A)
|
||
# 但是 macos-13 已经于 2025-12-04 下线
|
||
runs-on: macos-15-intel
|
||
|
||
steps:
|
||
- name: 检出代码
|
||
uses: actions/checkout@v6
|
||
|
||
- name: 检查编译器版本
|
||
run: |
|
||
clang --version
|
||
echo
|
||
gcc --version
|
||
echo
|
||
gcc-14 --version
|
||
|
||
- name: 为 x64 构建
|
||
run: |
|
||
make build-in-ci-release-mode
|
||
mv chsrc-ci-release chsrc-x64-macos
|
||
|
||
- name: List files
|
||
run: ls *-macos
|
||
|
||
- name: 上传至 'pre' release
|
||
uses: softprops/action-gh-release@v2
|
||
# if: startsWith(github.ref, 'refs/tags/')
|
||
with:
|
||
tag_name: pre
|
||
files: |
|
||
chsrc-x64-macos
|