Skip to content

Build

Build #70

Workflow file for this run

name: Build
on:
workflow_dispatch:
jobs:
create_release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
date: ${{ steps.date.outputs.date }}
steps:
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
tag_name: TAS_${{ steps.date.outputs.date }}
release_name: TAS_${{ steps.date.outputs.date }}
draft: true
build_full_windows:
needs: create_release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12.4"
- name: Print working directory and disk space
run: |
echo "Current working directory:"
pwd
echo "Available disk space on all drives:"
Get-PSDrive -PSProvider FileSystem | Select-Object -Property Name, @{Name="Used(GB)";Expression={[math]::round($_.Used/1GB,2)}}, @{Name="Free(GB)";Expression={[math]::round($_.Free/1GB,2)}}, @{Name="Total(GB)";Expression={[math]::round($_.Used/1GB,2) + [math]::round($_.Free/1GB,2)}}
- name: Run full build script
run: python build.py --output dist-full
- name: Compress full directory
run: |
cd ${{ github.workspace }}/dist-full/main/
7z a -t7z -m0=lzma2 -mx=9 -ms=1536m -md=273m ../../TAS_${{ needs.create_release.outputs.date }}_Full_Windows.7z *
- name: Print upload URL
run: echo "${{ needs.create_release.outputs.upload_url }}"
- name: Verify asset file exists
run: |
if [ -f TAS_${{ needs.create_release.outputs.date }}_Full_Windows.7z ]; then
echo "Asset file exists."
else
echo "Asset file does not exist."
exit 1
fi
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: TAS_${{ needs.create_release.outputs.date }}_Full_Windows.7z
asset_name: TAS_${{ needs.create_release.outputs.date }}_Full_Windows.7z
asset_content_type: application/x-7z-compressed
build_full_linux:
needs: create_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12.4"
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: "12.4.0"
- name: Print working directory and disk space
run: |
echo "Current working directory:"
pwd
echo "Available disk space:"
df -h
- name: Run full build script
run: python build-linux.py --output dist-full
- name: Compress full directory
run: |
cd ${{ github.workspace }}/dist/main/
7z a -t7z -m0=lzma2 -mx=9 -ms=1536m -md=273m ../../TAS_${{ needs.create_release.outputs.date }}_Full_Linux.7z *
- name: Print upload URL
run: echo "${{ needs.create_release.outputs.upload_url }}"
- name: Verify asset file exists
run: |
if [ -f TAS_${{ needs.create_release.outputs.date }}_Full_Linux.7z ]; then
echo "Asset file exists."
else
echo "Asset file does not exist."
exit 1
fi
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: TAS_${{ needs.create_release.outputs.date }}_Full_Linux.7z
asset_name: TAS_${{ needs.create_release.outputs.date }}_Full_Linux.7z
asset_content_type: application/x-7z-compressed
build_lite_windows:
needs: create_release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12.4"
- name: Print working directory and disk space
run: |
echo "Current working directory:"
pwd
echo "Available disk space on all drives:"
Get-PSDrive -PSProvider FileSystem | Select-Object -Property Name, @{Name="Used(GB)";Expression={[math]::round($_.Used/1GB,2)}}, @{Name="Free(GB)";Expression={[math]::round($_.Free/1GB,2)}}, @{Name="Total(GB)";Expression={[math]::round($_.Used/1GB,2) + [math]::round($_.Free/1GB,2)}}
- name: Run lite build script
run: python build-lite.py --output dist-lite
- name: Compress lite directory
run: |
cd ${{ github.workspace }}/dist-lite/main/
7z a -t7z -m0=lzma2 -mx=9 -ms=1536m -md=273m ../../TAS_${{ needs.create_release.outputs.date }}_Lite_Windows.7z *
- name: Print upload URL
run: echo "${{ needs.create_release.outputs.upload_url }}"
- name: Verify asset file exists
run: |
if [ -f TAS_${{ needs.create_release.outputs.date }}_Lite_Windows.7z ]; then
echo "Asset file exists."
else
echo "Asset file does not exist."
exit 1
fi
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: TAS_${{ needs.create_release.outputs.date }}_Lite_Windows.7z
asset_name: TAS_${{ needs.create_release.outputs.date }}_Lite_Windows.7z
asset_content_type: application/x-7z-compressed