Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
on: ['push', 'pull_request']
on: ["push", "pull_request"]

jobs:
compile_exec:
name: Compile to executables
runs-on: ${{ matrix.config.os }}
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/rewrite' # just to see if it works
strategy:
matrix:
config:
Expand All @@ -13,14 +13,23 @@ jobs:
- os: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
python-version: '3.9'
- name: Install dependencies for ${{ matrix.config.os }}
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -r requirements.txt
pip install pyinstaller
- name: Build with pyinstaller for ${{ matrix.config.os }}
run: pyinstaller popcorn.spec
toolchain: stable

- name: Install dependencies on Ubuntu
if: startsWith(matrix.config.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install cmake pkg-config libgtk-3-dev

- name: Update toolchain
run: rustup update

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Build with Cargo
uses: actions-rs/cargo@v1
with:
command: build
args: --release
53 changes: 43 additions & 10 deletions .github/workflows/compile_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,50 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # [!] we need to checkout with tags and commit history
- name: Setup python
uses: actions/setup-python@v3

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
python-version: '3.9'
- name: Install dependencies for ${{ matrix.config.os }}
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -r requirements.txt
pip install pyinstaller
- name: Build with pyinstaller for ${{ matrix.config.os }}
run: pyinstaller popcorn.spec
toolchain: stable

- name: Install dependencies on Ubuntu
if: startsWith(matrix.config.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install cmake pkg-config libgtk-3-dev

- name: Build with Cargo for ${{ matrix.config.os }}
if: startsWith(matrix.config.os, 'ubuntu')
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu

uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{with.target}}

if: startsWith(matrix.config.os, 'macos')
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin # will probably have to change this around to accomodate for M1 & M2

uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{with.target}}

if: startsWith(matrix.config.os, 'windows') # not sure if a target is needed here
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-pc-windows-msvc

uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{with.target}}

- name: Copy files to be compressed
run: |
cp README.md ./dist
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ jobs:
runs-on: ubuntu-latest
name: CI workflow
steps:
- name: checkout source repo
uses: actions/checkout@v2
- name: checkout source repo
uses: actions/checkout@v2

- name: linting
uses: programmingwithalex/pylinters@v1.4.2
with:
python-root: '.'
flake8-flags: '--max-line-length 120'
mypy-flags: '--ignore-missing-imports --install-types --non-interactive'
fail-on-isort: true
- name: setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Run cargo clean
uses: actions-rs/cargo@v1
with:
command: clean
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
# editors
.idea
.vscode
.fleet

# python
**/__pycache__
venv

# pyinstaller
build
/build
dist

# internal
.popcorn

# my list
**/TODO
**/TODO

# Added by cargo

/target
24 changes: 14 additions & 10 deletions .kernelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"kernel_name": "popcorn",
"kernel_type": "unpacked",
"unpacked_husk": "python @local/popcorn.py @args",
"dev_cmd": "popcorn dev",
"seed_cmd": "cp -r * @dest",
"advanced": {
"os": ["mac", "windows", "linux"],
"dev_node": "-dev"
}
}
"kernel_name": "popcorn",
"kernel_type": "unpacked",
"unpacked_husk": "python @local/popcorn.py @args",
"dev_cmd": "popcorn dev",
"seed_cmd": "cp -r * @dest",
"advanced": {
"os": [
"mac",
"windows",
"linux"
],
"dev_node": "-dev"
}
}
Loading