Skip to content

add a preliminary Maekfile.js as an alternative build system; not yet… #45

add a preliminary Maekfile.js as an alternative build system; not yet…

add a preliminary Maekfile.js as an alternative build system; not yet… #45

name: Build Libraries
on:
push:
release:
types: [created]
jobs:
build-windows:
name: Build (Windows)
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Build Code
shell: cmd
run: |
dir/w
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
git clone https://github.com/ixchow/kit-libs-win
git clone https://github.com/eigenteam/eigen-git-mirror eigen
git clone https://github.com/ixchow/kit
python .github/workflows/download-jam.py
mkdir dist
"work\jam.exe" JAM_TOOLSET=VISUALC -j3 -q
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Package
shell: cmd
run: |
copy README.md dist
rename dist "autoknit-windows-%TAG_NAME%"
"C:\Program Files\7-Zip\7z.exe" a -r "autoknit-windows-%TAG_NAME%.zip" "autoknit-windows-%TAG_NAME%"
dir/w
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Upload Result
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: autoknit-windows-${{ github.event.release.tag_name }}.zip
asset_name: autoknit-windows-${{ github.event.release.tag_name }}.zip
asset_content_type: application/zip
build-linux:
name: Build (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Build Code
shell: bash
run: |
sudo apt install ftjam libglm-dev libpng-dev libsdl2-dev libeigen3-dev
git clone https://github.com/ixchow/kit
mkdir dist
jam -j3 -q
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Package
shell: bash
run: |
cp README.md dist
mv dist "autoknit-linux-$TAG_NAME"
tar cfz "autoknit-linux-$TAG_NAME"".tar.gz" "autoknit-linux-$TAG_NAME"
ls
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Upload Result
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: autoknit-linux-${{ github.event.release.tag_name }}.tar.gz
asset_name: autoknit-linux-${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip
build-macos:
name: Build (MacOS)
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Build Code
shell: bash
run: |
brew install ftjam sdl2 glm eigen libpng
git clone https://github.com/ixchow/kit
mkdir dist
jam -j3 -q
- name: Package
shell: bash
run: |
cp README.md dist
mv dist "autoknit-macos-$TAG_NAME"
tar cfz "autoknit-macos-$TAG_NAME"".tar.gz" "autoknit-macos-$TAG_NAME"
ls
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Upload Result
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: autoknit-macos-${{ github.event.release.tag_name }}.tar.gz
asset_name: autoknit-macos-${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip