Skip to content

Commit

Permalink
Merge pull request #43 from kochounoyume/feature/v2
Browse files Browse the repository at this point in the history
ver2.0.0
  • Loading branch information
kochounoyume authored Dec 31, 2024
2 parents eeae75b + 9dacd52 commit 5a1b0cd
Show file tree
Hide file tree
Showing 105 changed files with 1,112 additions and 2,676 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/docfx-unitypackage.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/publish-docfx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish DocFX

on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Setup DocFx
run: dotnet tool update -g docfx

- name: Dotnet Restore
run: dotnet tool restore

- name: Build
run: docfx docs/docfx.json

- name: Upload artifacts
uses: actions/upload-pages-artifact@v2
with:
path: docs/_site

deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
60 changes: 60 additions & 0 deletions .github/workflows/scripts/free_disk_space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
#
# Clone from:https://github.com/game-ci/docker/blob/main/.github/workflows/scripts/free_disk_space.sh
#
echo "=============================================================================="
echo "Freeing up disk space on CI system"
echo "=============================================================================="
echo ""

# Before
echo "Disk space before:"
df -h
echo ""

# List packages
echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
echo ""

# Remove packages
echo ""
echo "Removing large packages"
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
echo ""
echo "Disk space after apt-get:"
df -h
echo ""

# Large dirs
echo "Removing large directories"
# https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/graalvm/
sudo rm -rf /usr/local/.ghcup/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo ""
echo "Disk space after removing large directories:"
df -h
echo ""

# https://github.com/actions/virtual-environments/issues/709#issuecomment-612569242
echo "Removing preinstalled tools"
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo ""

# After
echo "Disk space after:"
df -h
echo ""
55 changes: 55 additions & 0 deletions .github/workflows/unity-compile-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run the Unity Compile Test
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
paths:
- Assets/**
- Packages/**
- ProjectSettings/**
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Run the Unity Compile Test
runs-on: ubuntu-latest
steps:
- name: Check out my unity project.
uses: actions/checkout@v4.2.2
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4.2.0
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- name: Free disk space
run: |
chmod +x ./.github/workflows/scripts/free_disk_space.sh
.github/workflows/scripts/free_disk_space.sh
git checkout -- ./.github/workflows/scripts/free_disk_space.sh
- name: Compile Test
uses: game-ci/unity-test-runner@v4.3.1
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: auto
testMode: editmode
- uses: actions/upload-artifact@v4.5.0
if: always()
with:
name: Test results
path: artifacts
retention-days: 2
Loading

0 comments on commit 5a1b0cd

Please sign in to comment.