Skip to content

Commit 21e4b37

Browse files
authored
Merge pull request #1 from Bytebit-Org/task/add-ci-and-release
Task/add ci and release
2 parents 66439c2 + 391b1ea commit 21e4b37

File tree

222 files changed

+8381
-8253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+8381
-8253
lines changed

.github/workflows/CI.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: install selene
10+
run: |
11+
curl https://github.com/Kampfkarren/selene/releases/download/0.9.1/selene-linux -L -o selene
12+
chmod +x ./selene
13+
- name: run selene
14+
run: ./selene ./src
15+
unit-tests:
16+
runs-on: windows-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: download roblox install script
20+
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/install.py" -OutFile install.py
21+
- name: download settings file
22+
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/GlobalSettings_13.xml" -OutFile GlobalSettings_13.xml
23+
- name: install pip deps
24+
run: pip install wget psutil
25+
- name: install roblox
26+
run: python install.py "${{ secrets.ROBLOSECURITY }}"
27+
- name: install foreman
28+
uses: rojo-rbx/setup-foreman@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
- name: install foreman packages (rojo, run-in-roblox)
32+
run: foreman install
33+
- name: install wally packages
34+
run: wally install
35+
- name: run rojo build
36+
run: rojo build -o .\\unit_tests.rbxlx .\\unit-tests.project.json
37+
- name: run tests
38+
run: run-in-roblox --place .\\unit_tests.rbxlx --script .\\spec.server.lua

.github/workflows/Release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Release
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: install python dependencies
11+
run: pip3 install -r requirements.txt
12+
- name: get wally version
13+
id: get_wally_version
14+
run: echo "::set-output name=version-string::$(python3 ./scripts/get_wally_version_string.py)"
15+
- name: install foreman
16+
uses: rojo-rbx/setup-foreman@v1
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
- name: install foreman packages (rojo, run-in-roblox)
20+
run: foreman install
21+
- name: install wally packages
22+
run: wally install
23+
- name: run rojo build
24+
run: rojo build -o ./linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx ./standalone-model.project.json
25+
- name: create-release
26+
uses: actions/create-release@latest
27+
id: create_release
28+
with:
29+
draft: false
30+
prerelease: false
31+
release_name: ${{ steps.get_wally_version.outputs.version-string }}
32+
tag_name: ${{ steps.get_wally_version.outputs.version-string }}
33+
body_path: CHANGELOG.md
34+
env:
35+
GITHUB_TOKEN: ${{ github.token }}
36+
- name: upload rbxmx file to release
37+
uses: actions/upload-release-asset@v1
38+
env:
39+
GITHUB_TOKEN: ${{ github.token }}
40+
with:
41+
upload_url: ${{ steps.create_release.outputs.upload_url }}
42+
asset_path: ./linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx
43+
asset_name: linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx
44+
asset_content_type: form
45+
- name: upload rbxmx file to Roblox
46+
run: |
47+
cd ./scripts
48+
python upload_model.py -a ${{ secrets.ASSET_ID }} -f ../linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx -r "${{ secrets.UPLOADER_BOT_ROBLOSECURITY }}"
49+
cd ..
50+
- name: prepare wally package contents
51+
run: |
52+
mkdir -p ~/temp/linalg
53+
cp -r ./{include,out} ~/temp/linalg/
54+
cp ./{CHANGELOG.md,LICENSE,README.md,wally.lock,wally.toml} ~/temp/linalg/
55+
cp ./standalone-model.project.json ~/temp/linalg/default.project.json
56+
mkdir ~/temp/linalg/node_modules
57+
cp -r ./node_modules/@rbxts ~/temp/linalg/node_modules/
58+
- name: prepare wally auth
59+
run: |
60+
mkdir ~/.wally
61+
echo -e '${{ secrets.WALLY_AUTH }}' > ~/.wally/auth.toml
62+
- name: publish wally package
63+
run: wally publish --project-path ~/temp/linalg/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.vscode
33
quickTesting.lua
44
luacov.stats.out
5+
Packages

.luacheckrc

Lines changed: 0 additions & 23 deletions
This file was deleted.

.luacov

Lines changed: 0 additions & 8 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Releases!

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Lua Linear Algebra
1+
# Lua Linear Algebra
22
===
33

44
<div align="center">
@@ -12,7 +12,22 @@ Lua Linear Algebra
1212

1313
A simple script to implement linear algebra functions not provided by the Lua standard API, developed especially for use on Roblox
1414

15-
Documentation
15+
## Installation
16+
### Wally
17+
[Wally](https://github.com/UpliftGames/wally/) users can install this package by adding the following line to their `Wally.toml` under `[dependencies]`:
18+
```
19+
linalg = "bytebit/[email protected]"
20+
```
21+
22+
Then just run `wally install`.
23+
24+
### From model file
25+
Model files are uploaded to every release as `.rbxmx` files. You can download the file from the [Releases page](https://github.com/Bytebit-Org/lua-linalg/releases) and load it into your project however you see fit.
26+
27+
### From model asset
28+
New versions of the asset are uploaded with every release. The asset can be added to your Roblox Inventory and then inserted into your Place via Toolbox by getting it [here.](https://www.roblox.com/library/7881451885/linalg-Package)
29+
30+
## Documentation
1631
---
1732

1833
### Matrix Functions

foreman.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tools]
2+
rojo = { source = "rojo-rbx/rojo", version = "6" }
3+
run-in-roblox = { source = "rojo-rbx/run-in-roblox", version = "0.3.0" }
4+
wally = { source = "UpliftGames/wally", version = "0.2.1" }

modules/lemur/LICENSE.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)