Skip to content

try self-hosted runner #74

try self-hosted runner

try self-hosted runner #74

Workflow file for this run

name: Publish to GitHub
on:
push:
branches: ["main", "github-action"]
pull_request:
branches: ["main"]
jobs:
build-macOS:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Setup Homebrew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Setup LLVM
run: brew install llvm
- name: Setup Environment Variables
run: echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
- name: Setup Build Script
if: ${{ runner.os != 'Windows' }}
run: chmod +x build.sh
- name: Build
run: |
xmake f -p macosx -a arm64 -m release
xmake -y
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Mamba
path: |
build/macosx/arm64/release/mamba
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Build
run: |
xmake f -p windows -a x64 -m release
xmake -y
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Mamba
path: |
build/windows/x64/release/mamba.exe
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Setup Homebrew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Setup LLVM
run: brew install llvm
- name: Setup Environment Variables
run: echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
- name: Setup Build Script
if: ${{ runner.os != 'Windows' }}
run: chmod +x build.sh
- name: Build
run: |
xmake f -p macosx -a arm64 -m release
xmake -y
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Mamba
path: |
build/macosx/arm64/release/mamba