Skip to content

Commit

Permalink
Merge pull request #343 from RockstarLang/rockstar2
Browse files Browse the repository at this point in the history
Rockstar is dead. Long live Rockstar.
  • Loading branch information
dylanbeattie authored Oct 12, 2024
2 parents f77bd10 + 0eee49d commit f0ba08f
Show file tree
Hide file tree
Showing 688 changed files with 61,549 additions and 61,302 deletions.
66 changes: 0 additions & 66 deletions .circleci/config.yml

This file was deleted.

395 changes: 395 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: bundler
directory: /
schedule:
interval: daily
allow:
- dependency-type: direct
77 changes: 77 additions & 0 deletions .github/workflows/build-and-deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: build-and-deploy-codewithrockstar.com
on:
# Run after the engine is rebuilt
workflow_run:
workflows: ['release-rockstar-engine']
types: [completed]
branches: ['main']
# Run after any website source files are changed
push:
branches: ["main"]
paths:
- 'codewithrockstar.com/**'
- 'codemirror-lang-rockstar/**'
- '.github/workflows/publish-codewithrockstar.com.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-main-site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: ./codewithrockstar.com
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: fetch rockstar-wasm-binary from cache
uses: actions/cache/restore@v4
id: restore-cached-wasm-binary
with:
enableCrossOsArchive: true
path: rockstar-wasm-binary
key: rockstar-wasm-binary
- name: Copy WASM binaries into site source
run: cp -r rockstar-wasm-binary/ codewithrockstar.com/wasm/
- name: build CodeMirror editor bundle with Rockstar language support
run: |
cd cm-lang-rockstar
npm install
npm run test
npm run prepare
- name: Build codewithrockstar.com site
run: |
cd codewithrockstar.com
ls -l /home/runner/work/rockstar2/rockstar2/codewithrockstar.com/examples/01-getting-started/hello-world.rock
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./codewithrockstar.com/_site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-main-site
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
45 changes: 45 additions & 0 deletions .github/workflows/build-macos-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build-macos-binary
on:
workflow_dispatch:
workflow_call:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up .NET 8 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
branch: main
- name: "Display build version"
run: echo "tag ${{ steps.semver.outputs.next }}"
# - name: Patch VERSION constant inside Starship/Rockstar/Program.cs
# run: sed -i "" 's/__VERSION__/${{ steps.semver.outputs.next }}/g' Starship/Rockstar/Program.cs
- name: dotnet publish macos x64 binary
run: dotnet publish Starship/Rockstar -o rockstar-macos-x64-binary -r osx-x64 -c Release
- name: dotnet publish macos ARM64 binary
run: dotnet publish Starship/Rockstar -o rockstar-macos-arm64-binary -r osx-arm64 -c Release
- name: Test ARM64 binary
run:
rockstar-macos-arm64-binary/rockstar --version
- uses: actions/cache/save@v4
name: Save rockstar-macos-x64-binary to cache
id: save-rockstar-macos-x64-binary-to-cache
with:
enableCrossOsArchive: true
path: rockstar-macos-x64-binary
key: rockstar-macos-x64-binary-${{ github.run_id }}
- uses: actions/cache/save@v4
name: Save rockstar-macos-arm64-binary to cache
id: save-rockstar-macos-arm64-binary-to-cache
with:
enableCrossOsArchive: true
path: rockstar-macos-arm64-binary
key: rockstar-macos-arm64-binary-${{ github.run_id }}
79 changes: 79 additions & 0 deletions .github/workflows/build-wasm-and-linux-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: build-wasm-and-linux-binaries
on:
push:
branches: ["main"]
paths:
- 'Starship/**'
- '.github/workflows/build-wasm-and-linux-binaries.yml'
- '.github/workflows/build-windows-binary.yml'
- '.github/workflows/build-macos-binary.yml'
workflow_dispatch:
workflow_call:
concurrency:
group: "build-wasm-and-linux-binaries"
cancel-in-progress: true
jobs:
build-engine:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up .NET 8 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Install .NET WASM workloads
working-directory: ./Starship
run: dotnet workload install wasm-tools
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
branch: main
- name: "Display build version"
run: echo "tag ${{ steps.semver.outputs.next }}"
- name: Patch VERSION constant inside Starship/Rockstar.Engine/RockstarEnvironment.cs
run: sed -i 's/VERSION = "[^"]*";/VERSION = "${{ steps.semver.outputs.next }}";/g' Starship/Rockstar.Engine/RockstarEnvironment.cs
- name: Build Rockstar
run: dotnet build Starship -c Release
- name: Test Rockstar
run: dotnet test Starship -c Release
# - name: Update CHANGELOG
# id: changelog
# uses: requarks/changelog-action@v1
# with:
# token: ${{ github.token }}
# tag: ${{ github.ref_name }}
- name: Commit changes with new version
run: |
git config --global user.name 'workflows/build-wasm-and-linux-binaries.yml'
git config --global user.email 'dylanbeattie@users.noreply.github.com'
git commit -am "[skip actions] set VERSION = ${{ steps.semver.outputs.next }} in RockstarEnvironment.cs"
git push
- name: dotnet publish WASM engine
run: dotnet publish Starship/Rockstar.Wasm -o rockstar-wasm-binary -c Release
- name: dotnet publish Linux binary
run: dotnet publish Starship/Rockstar -o rockstar-linux-x64-binary -c Release
- uses: actions/cache/save@v4
name: save rockstar-wasm-binary to cache
id: save-rockstar-wasm-binary-to-cache
with:
enableCrossOsArchive: true
path: rockstar-wasm-binary
key: rockstar-wasm-binary-${{ github.run_id }}
- uses: actions/cache/save@v4
name: save rockstar-linux-x64-binary to cache
id: save-rockstar-linux-x64-binary-to-cache
with:
enableCrossOsArchive: true
path: rockstar-linux-x64-binary
key: rockstar-linux-x64-binary-${{ github.run_id }}
rockstar-macos-binary:
needs: build-engine
uses: ./.github/workflows/build-macos-binary.yml
rockstar-windows-binary:
needs: build-engine
uses: ./.github/workflows/build-windows-binary.yml

36 changes: 36 additions & 0 deletions .github/workflows/build-windows-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: build-windows-binary
on:
workflow_dispatch:
workflow_call:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
branch: main
- name: "Display build version"
run: echo "tag ${{ steps.semver.outputs.next }}"
- name: Set up .NET 8 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
# - name: Patch VERSION constant inside Starship/Rockstar/Program.cs
# run: (Get-content Starship/Rockstar/Program.cs) | Foreach-Object {$_ -replace "__VERSION__", "${{ steps.semver.outputs.next }}"} | Set-Content Starship/Rockstar/Program.cs
- name: dotnet publish Windows x64 binary
run: dotnet publish Starship/Rockstar -o rockstar-windows-x64-binary -c Release
- name: Test Windows x64 binary
run:
rockstar-windows-x64-binary/rockstar.exe --version
- uses: actions/cache/save@v4
name: save rockstar-windows-x64-binary to cache
id: save-rockstar-windows-x64-binary-to-cache
with:
enableCrossOsArchive: true
path: rockstar-windows-x64-binary
key: rockstar-windows-x64-binary-${{ github.run_id }}
32 changes: 0 additions & 32 deletions .github/workflows/pegjs-and-test.yml

This file was deleted.

Loading

0 comments on commit f0ba08f

Please sign in to comment.