Skip to content

Commit

Permalink
Merge branch 'main' of github.com:refaktor/rye-fyne
Browse files Browse the repository at this point in the history
  • Loading branch information
refaktor committed Oct 3, 2024
2 parents 2b94075 + 21aa3d8 commit 3257805
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 17 deletions.
105 changes: 98 additions & 7 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: build
name: build-release

on:
push:
branches:
- 'main'
# branches:
# - 'main'
tags:
- 'testbuild*'
pull_request:
- 'v*'
# pull_request:

permissions:
contents: write
Expand All @@ -25,8 +25,99 @@ jobs:
cache: true
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: go mod tidy
- run: fyne package --release
- run: go build -o rye-fyne.exe
- uses: actions/upload-artifact@v4
with:
name: rye-fyne
name: rye-fyne-windows-amd64
path: rye-fyne.exe

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
cache: true
- run: sudo apt update && sudo apt install gcc libegl1-mesa-dev xorg-dev
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: go mod tidy
- run: go build -o rye-fyne
- run: tar czf rye-fyne-linux-amd64.tar.gz rye-fyne
- uses: actions/upload-artifact@v4
with:
name: rye-fyne-linux-amd64
path: rye-fyne-linux-amd64.tar.gz

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
cache: true
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: go mod tidy
- run: go build -o rye-fyne
- run: tar czf rye-fyne-macos-amd64.tar.gz rye-fyne
- uses: actions/upload-artifact@v4
with:
name: rye-fyne-macos-amd64
path: rye-fyne-macos-amd64.tar.gz

release:
runs-on: ubuntu-latest
needs: [build-macos, build-windows, build-linux]
steps:

- uses: actions/download-artifact@v4
with:
name: rye-fyne-linux-amd64

- uses: actions/download-artifact@v4
with:
name: rye-fyne-windows-amd64

- uses: actions/download-artifact@v4
with:
name: rye-fyne-macos-amd64

- uses: actions/create-release@v1
id: create-new-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./rye-fyne.exe
asset_name: rye-fyne.exe
asset_content_type: application/vnd.microsoft.portable-executable

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./rye-fyne-linux-amd64.tar.gz
asset_name: rye-fyne-linux-amd64.tar.gz
asset_content_type: application/x-gtar

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./rye-fyne-macos-amd64.tar.gz
asset_name: rye-fyne-macos-amd64.tar.gz
asset_content_type: application/x-gtar
72 changes: 72 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: build

on:
push:
# branches:
# - 'main'
tags:
- 'testbuild*'
# pull_request:

permissions:
contents: write
packages: write

jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
cache: true
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: go mod tidy
- run: go build -o rye-fyne.exe
- uses: actions/upload-artifact@v4
with:
name: rye-fyne
path: rye-fyne.exe

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
cache: true
- run: sudo apt update && sudo apt install gcc libegl1-mesa-dev xorg-dev
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: go mod tidy
- run: go build -o rye-fyne
- run: tar czf rye-fyne-linux-amd64.tar.gz rye-fyne
- uses: actions/upload-artifact@v4
with:
name: rye-fyne-linux-amd64
path: rye-fyne-linux-amd64.tar.xz

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
cache: true
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: go mod tidy
- run: go build -o rye-fyne
- run: tar czf rye-fyne-macos-amd64.tar.gz rye-fyne
- uses: actions/upload-artifact@v4
with:
name: rye-fyne-macos-amd64
path: rye-fyne-macos-amd64.tar.xz

68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: build

on:
push:
# branches:
# - 'main'
tags:
- 'testrelease*'
# pull_request:

permissions:
contents: write
packages: write

jobs:
release:
runs-on: ubuntu-latest
# needs: [build-windows, build-linux, build-macos]
steps:
- uses: ./.github/workflows/build.yml
- name: Create GitHub Release

- uses: actions/download-artifact@v4
with:
name: rye-fyne-linux-amd64

- uses: actions/download-artifact@v4
with:
name: rye-fyne-windows-amd64

- uses: actions/download-artifact@v4
with:
name: rye-fyne-macos-amd64

- uses: actions/create-release@v1
id: create-new-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./rye-fyne-windows-amd64.exe
asset_name: rye-fyne-windows-amd64.exe
asset_content_type: application/vnd.microsoft.portable-executable

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./rye-fyne-linux-amd64.tar.xz
asset_name: rye-fyne-linux-amd64.tar.xz
asset_content_type: application/x-gtar

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./rye-fyne-macos-amd64.tar.gz
asset_name: rye-fyne-macos-amd64.tar.gz
asset_content_type: application/x-gtar
36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,46 @@ we have great emphasis on **interactive use** (Rye shell) where we will explore

**[Rye language repository](https://github.com/refaktor/rye)** | **[Rye website](https://ryelang.org/)** | **[Reddit group](https://reddit.com/r/ryelang/)**

### Why a separate repository
## Download Rye-Fyne

* So Rye remains lighter on dependencies, easier to build, focused on backend and interactive shell
* So that "frontend" related development is separated from language development
* So that we test and improve on how users of Rye can externally extend it, add their own (private) bindings and write their own Go (private) builtin functions for hot-code optimization
Download the binary:
* Linux: [rye-fyne-linux-amd64.tar.gz](https://github.com/refaktor/rye-fyne/releases/download/23/rye-fyne-linux-amd64.tar.gz)
* MacOS: [rye-fyne-macos-amd64.tar.gz](https://github.com/refaktor/rye-fyne/releases/download/23/rye-fyne-macos-amd64.tar.gz)
* Windows: [rye-fyne.exe](https://github.com/refaktor/rye-fyne/releases/download/23/rye-fyne.exe)

#### Build and test
This includes just the binary (executable), to download examples you should still need to download ZIP from the github. In future
we will make the binary download all required things itself if raw with `rye install`.

You need [Go](https://go.dev/) installed. Please follow Go's installation instructions for your opearating system.
## Building Rye-Fyne

In **rye-fyne** directory run:
You need [Go](https://go.dev/) installed. Please follow Go's installation instructions for your opearating system.

```
# To get rye-fyne use "Download ZIP" from "<> Code" button
# on the github page: https://github.com/refaktor/rye-fyne
# or use Git:
git clone https://github.com/refaktor/rye-fyne.git
# enter directory
cd rye-fyne
# build rye with fyne in bin/fyne/rye
./build
# Try the hello example
bin/rye examples/fyne/button.rye
bin/rye-fyne examples/fyne/button.rye
# Try the feedback example
bin/rye examples/fyne/feedback.rye
bin/rye-fyne examples/fyne/feedback.rye
# Try the Live GUI demo
bin/rye examples/fyne/live.rye
bin/rye-fyne examples/fyne/live.rye
# Or enter the Rye console
bin/rye-fyne
x> cc fyne
x> app .window "Hello" |set-content label "world" |show-and-run
(Ctrl-c to exit)
```

#### Example
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/refaktor/rye-front/current"
"github.com/refaktor/rye/env"
"github.com/refaktor/rye/runner"
"github.com/jwalton/go-supportscolor"
)

/* type TagType int
Expand All @@ -31,6 +32,7 @@ type node struct {

func main() {

supportscolor.Stdout()
runner.DoMain(func(ps *env.ProgramState) {
current.RegisterBuiltins(ps)
})
Expand Down

0 comments on commit 3257805

Please sign in to comment.