Skip to content
Merged
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
28 changes: 17 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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,20 @@ 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
run: cargo build
40 changes: 30 additions & 10 deletions .github/workflows/compile_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,37 @@ 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
- uses: actions/checkout@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
run: cargo build --release --target $TARGET

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

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

- name: Copy files to be compressed
run: |
cp README.md ./dist
Expand Down