Skip to content

Commit

Permalink
purge from autd3 repo
Browse files Browse the repository at this point in the history
  • Loading branch information
s5suzuki committed Dec 10, 2023
0 parents commit 84669ed
Show file tree
Hide file tree
Showing 150 changed files with 38,201 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: 'build tools setup action'
inputs:
github-token:
description: 'GITHUB_TOKEN'
required: true
default: ''
os:
description: 'os'
required: true
default: ''
runs:
using: "composite"
steps:
- name: Setup Python
if: needs.check-src.outputs.status
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install packaging
shell: bash
run: |
python3 -m pip install -U packaging
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ inputs.github-token }}

- name: install shaderc
shell: pwsh
if: inputs.os == 'windows-latest'
run: |
Invoke-WebRequest -URI https://storage.googleapis.com/shaderc/artifacts/prod/graphics_shader_compiler/shaderc/windows/continuous_release_2019/10/20230531-104731/install.zip -OutFile shaderc.zip
Expand-Archive -Path shaderc.zip -DestinationPath shaderc
echo "SHADERC_LIB_DIR=$Env:GITHUB_WORKSPACE/shaderc/install/lib" >> $Env:GITHUB_ENV
rm shaderc.zip
- name: install shaderc
shell: bash
if: inputs.os == 'ubuntu-latest'
run: |
curl -L https://storage.googleapis.com/shaderc/artifacts/prod/graphics_shader_compiler/shaderc/linux/continuous_clang_release/418/20230531-104531/install.tgz > shaderc.tgz
tar -xzf shaderc.tgz
echo "SHADERC_LIB_DIR=$GITHUB_WORKSPACE/install/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install/lib" >> $GITHUB_ENV
rm shaderc.tgz
- name: install shaderc
shell: bash
if: inputs.os == 'macos-latest'
run: |
curl -L https://storage.googleapis.com/shaderc/artifacts/prod/graphics_shader_compiler/shaderc/macos/continuous_clang_release/426/20230531-104534/install.tgz > shaderc.tgz
tar -xzf shaderc.tgz
echo "SHADERC_LIB_DIR=$GITHUB_WORKSPACE/install/lib" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=$GITHUB_WORKSPACE/install/lib" >> $GITHUB_ENV
cp install/lib/*.dylib /usr/local/lib/
rm shaderc.tgz
- name: install aarch64 target on macos
shell: bash
if: inputs.os == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
- name: install dependencies
shell: bash
if: inputs.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libfreetype6-dev libfontconfig1-dev
75 changes: 75 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: build

on:
push:
branches:
- 'develop'
pull_request:
types: [opened, reopened, review_requested]

env:
CARGO_INCREMENTAL: 0

jobs:
check-src:
runs-on: ubuntu-latest
name: check if server files changed
outputs:
status: ${{ steps.changed-files.outputs.modified_files }}
steps:
- uses: actions/checkout@v3
- uses: tj-actions/changed-files@v40
id: changed-files
with:
files: |
.github/workflows/build.yml
./**/*.rs
./**/*.toml
./**/*.ts
./**/*.svelte
./package.json
build-server:
needs: check-src
name: build-server
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Setup
if: needs.check-src.outputs.status
uses: ./.github/actions/setup-build
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
os: ${{ matrix.os }}
shaderc: true

- name: Rust cache
if: needs.check-src.outputs.status
uses: swatinem/rust-cache@v2
with:
workspaces: './server/src-tauri -> target'

- name: install dependencies (ubuntu only)
if: needs.check-src.outputs.status && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
- name: Sync node version and setup cache
if: needs.check-src.outputs.status
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: server/package-lock.json

- name: build server
if: needs.check-src.outputs.status
run: |
python3 build.py server build
Loading

0 comments on commit 84669ed

Please sign in to comment.