1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Added "Test" GitHub Actions Workflow (#269)

* Remove export_presets.cfg from gitignore

* Create export_presets.cfg

* Create godot-ci-export.yml

* Test DLL copying to artifact

* Test repo cloning and copying files

* Attempt to fix directory paths

* Fix directory paths again

* Remove export paths from export_presets.cfg

* Fix inferring script error

* Attempt to fix script error in Global.gd

This and the previous error in Input.gd only happened in the builds generated by GH Actions.

* Attempting to fix another error in Global.gd

* Checkout with submodules

* Added pixelorama folder to Linux build

And renamed "windows" to "windows-64bit" and "linux" to "linux-64bit" directories.

* Renamed artifacts

* Added emojis to step names

* Emojis for job names

* Removed --recurse-submodules from git clone

* Attempt to copy pixelorama folder to Mac's zip

* Revert previous commit

* Update and rename godot-ci-export.yml to godot-ci-test.yml
This commit is contained in:
Manolis Papadeas 2020-06-25 18:18:20 +03:00 committed by GitHub
parent 8bb1e61d8f
commit 4f0c0d77c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 338 additions and 13 deletions

113
.github/workflows/godot-ci-test.yml vendored Normal file
View file

@ -0,0 +1,113 @@
name: "godot-ci-test"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
GODOT_VERSION: 3.2.1
EXPORT_NAME: Pixelorama
jobs:
export-windows:
name: Windows Export 🗔
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.2.1
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
mkdir -v -p build/windows-64bit ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Windows Build 🔧
run: godot -v --export "Windows Desktop 64-bit" ./build/windows-64bit/$EXPORT_NAME.exe
- name: Clone Pixelorama Repository 📁
run: |
git clone https://github.com/Orama-Interactive/Pixelorama.git
cp -R /__w/Pixelorama/Pixelorama/Pixelorama/pixelorama ./build/windows-64bit
- name: Upload Artifact 🚀
uses: actions/upload-artifact@v1
with:
name: Windows-64bit
path: ./build/windows-64bit/
export-linux:
name: Linux Export 🐧
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.2.1
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
mkdir -v -p build/linux-64bit ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Linux Build 🔧
run: godot -v --export "Linux/X11 64-bit" ./build/linux-64bit/$EXPORT_NAME.x86_64
- name: Clone Pixelorama Repository 📁
run: |
git clone https://github.com/Orama-Interactive/Pixelorama.git
cp -R /__w/Pixelorama/Pixelorama/Pixelorama/pixelorama ./build/linux-64bit
- name: Upload Artifact 🚀
uses: actions/upload-artifact@v1
with:
name: Linux-64bit
path: ./build/linux-64bit/
export-mac:
name: Mac Export 🍎
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.2.1
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
mkdir -v -p build/mac ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Mac Build 🔧
run: godot -v --export "Mac OSX" ./build/mac/$EXPORT_NAME.zip
- name: Upload Artifact 🚀
uses: actions/upload-artifact@v1
with:
name: Mac
path: ./build/mac/
export-web:
name: Web Export 🌐
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.2.1
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
mkdir -v -p build/web ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Web Build 🔧
run: godot -v --export "HTML5" ./build/web/index.html
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build/web # The folder the action should deploy.
TARGET_FOLDER: early_access

1
.gitignore vendored
View file

@ -1,7 +1,6 @@
# Godot-specific ignores
.import/
export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation

193
export_presets.cfg Normal file
View file

@ -0,0 +1,193 @@
[preset.0]
name="Windows Desktop 64-bit"
platform="Windows Desktop"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.0.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
binary_format/embed_pck=false
custom_template/release=""
custom_template/debug=""
codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PoolStringArray( )
application/icon="res://assets/graphics/icons/icon.ico"
application/file_version="0.7"
application/product_version="0.7"
application/company_name="Orama Interactive"
application/product_name="Pixelorama"
application/file_description="Pixelorama - Your free & open-source sprite editor"
application/copyright="Orama Interactive 2020"
application/trademarks=""
[preset.1]
name="Linux/X11 64-bit"
platform="Linux/X11"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.1.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
binary_format/embed_pck=false
custom_template/release=""
custom_template/debug=""
[preset.2]
name="Mac OSX"
platform="Mac OSX"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.2.options]
custom_template/debug=""
custom_template/release=""
application/name="Pixelorama"
application/info="Pixelorama - Your free and open-source sprite editor"
application/icon="res://assets/graphics/icons/icon.icns"
application/identifier="com.orama_interactive.pixelorama"
application/signature=""
application/short_version="0.7"
application/version="0.7"
application/copyright="Orama Interactive 2020"
display/high_res=false
privacy/camera_usage_description=""
privacy/microphone_usage_description=""
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
[preset.3]
name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.3.options]
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=true
html/custom_html_shell=""
html/head_include=""
custom_template/release=""
custom_template/debug=""
[preset.4]
name="Windows Desktop 32-bit"
platform="Windows Desktop"
runnable=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.4.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=false
binary_format/embed_pck=false
custom_template/release=""
custom_template/debug=""
codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PoolStringArray( )
application/icon="res://assets/graphics/icons/icon.ico"
application/file_version="0.7"
application/product_version="0.7"
application/company_name="Orama Interactive"
application/product_name="Pixelorama"
application/file_description="Pixelorama - Your free & open-source sprite editor"
application/copyright="Orama Interactive 2020"
application/trademarks=""
[preset.5]
name="Linux/X11 32-bit"
platform="Linux/X11"
runnable=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.5.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=false
binary_format/embed_pck=false
custom_template/release=""
custom_template/debug=""

View file

@ -249,10 +249,22 @@ func _ready() -> void:
left_cursor = find_node_by_name(root, "LeftCursor")
right_cursor = find_node_by_name(root, "RightCursor")
canvas = find_node_by_name(root, "Canvas")
var pencil_cursor_image = preload("res://assets/graphics/cursor_icons/pencil_cursor.png")
var eraser_cursor_image = preload("res://assets/graphics/cursor_icons/eraser_cursor.png")
left_cursor_tool_texture = ImageTexture.new()
left_cursor_tool_texture.create_from_image(preload("res://assets/graphics/cursor_icons/pencil_cursor.png"))
if pencil_cursor_image is Image:
left_cursor_tool_texture.create_from_image(pencil_cursor_image)
elif pencil_cursor_image is ImageTexture:
left_cursor_tool_texture.create_from_image(pencil_cursor_image.get_data())
right_cursor_tool_texture = ImageTexture.new()
right_cursor_tool_texture.create_from_image(preload("res://assets/graphics/cursor_icons/eraser_cursor.png"))
if eraser_cursor_image is Image:
right_cursor_tool_texture.create_from_image(eraser_cursor_image)
elif eraser_cursor_image is ImageTexture:
right_cursor_tool_texture.create_from_image(eraser_cursor_image.get_data())
tabs = find_node_by_name(root, "Tabs")
main_viewport = find_node_by_name(root, "ViewportContainer")
second_viewport = find_node_by_name(root, "ViewportContainer2")
@ -648,19 +660,27 @@ func redo_custom_brush(_brush_button : BaseButton = null) -> void:
func update_custom_brush(mouse_button : int) -> void:
var brush_type : int = current_brush_types[mouse_button]
if brush_type == Brush_Types.PIXEL:
var pixel := Image.new()
pixel = preload("res://assets/graphics/pixel_image.png")
var pixel = preload("res://assets/graphics/pixel_image.png")
if pixel is Image:
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
elif pixel is ImageTexture:
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel.get_data(), 0)
elif brush_type == Brush_Types.CIRCLE:
var pixel := Image.new()
pixel = preload("res://assets/graphics/circle_9x9.png")
var pixel = preload("res://assets/graphics/circle_9x9.png")
if pixel is Image:
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
elif pixel is ImageTexture:
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel.get_data(), 0)
left_circle_points = plot_circle(brush_sizes[0])
right_circle_points = plot_circle(brush_sizes[1])
elif brush_type == Brush_Types.FILLED_CIRCLE:
var pixel := Image.new()
pixel = preload("res://assets/graphics/circle_filled_9x9.png")
var pixel = preload("res://assets/graphics/circle_filled_9x9.png")
if pixel is Image:
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
elif pixel is ImageTexture:
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel.get_data(), 0)
left_circle_points = plot_circle(brush_sizes[0])
right_circle_points = plot_circle(brush_sizes[1])
else:

View file

@ -109,7 +109,7 @@ func add_randomised_brush(fpaths : Array, tooltip_name : String) -> void:
var first_image : Image = loaded_images.pop_front()
# The index which this random brush will be at
var next_random_brush_index := Global.file_brush_container.get_child_count()
var next_random_brush_index : int = Global.file_brush_container.get_child_count()
Global.file_brushes.append(first_image)
Global.create_brush_button(first_image, Global.Brush_Types.RANDOM_FILE, tooltip_name)