This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
Update ctrtool.yml #19
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 maxcso | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/*.yml" | |
jobs: | |
build-linux-amd64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: "unknownbrackets/maxcso" | |
- run: | | |
sudo apt update -y | |
sudo apt install -y liblz4-dev libuv1-dev pkgconf zlib1g-dev | |
- run: make | |
- run: cp maxcso maxcso-linux_amd64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: maxcso-linux_amd64 | |
path: maxcso-linux_amd64 | |
build-linux-arm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: uraimo/run-on-arch-action@v2 | |
with: | |
arch: aarch64 | |
distro: ubuntu_latest | |
githubToken: ${{ github.token }} | |
shell: /bin/sh | |
dockerRunArgs: | | |
-v "${PWD}/artifacts:/artifacts" | |
install: | | |
apt update -y | |
apt install -y build-essential git liblz4-dev libuv1-dev pkgconf zlib1g-dev | |
run: | | |
mkdir -p /build | |
git clone https://github.com/unknownbrackets/maxcso.git /build | |
cd /build | |
make | |
cp maxcso /artifacts/maxcso-linux_aarch64 | |
setup: | | |
mkdir -p "${PWD}/artifacts" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: maxcso-linux_aarch64 | |
path: artifacts/maxcso-linux_aarch64 | |
build-macos: | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: "unknownbrackets/maxcso" | |
- run: | | |
brew update | |
brew install libdeflate libuv lz4 pkg-config | |
- run: sed -i "" -e "s|uv.h|$(brew --prefix libuv)/include/uv.h|" src/buffer_pool.h | |
- run: make | |
- run: cp maxcso maxcso-macos-${{ matrix.arch }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: maxcso-macos-${{ matrix.arch }} | |
path: maxcso-macos-${{ matrix.arch }} | |
strategy: | |
matrix: | |
include: | |
- arch: arm64 | |
runs-on: flyci-macos-large-latest-m2 | |
- arch: x86_64 | |
runs-on: macos-latest | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: "unknownbrackets/maxcso" | |
- uses: microsoft/setup-msbuild@v2 | |
- run: msbuild cli/maxcso.sln /p:configuration=Release /p:platform=x64 | |
- run: tree /f /a | |
- run: cp maxcso.exe maxcso-win_x64.exe | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: maxcso-win_x64.exe | |
path: maxcso-win_x64.exe | |
push: | |
needs: | |
- build-linux-amd64 | |
- build-linux-arm | |
- build-macos | |
- build-windows | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: maxcso | |
- run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git pull | |
git add --all . | |
git commit -m "Built maxcso" | |
- uses: ad-m/[email protected] | |
with: | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |