mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-25 23:24:15 +01:00
test
This commit is contained in:
parent
ad4f4db137
commit
b7bda71521
96
.github/workflows/build.yml
vendored
96
.github/workflows/build.yml
vendored
@ -55,27 +55,23 @@ jobs:
|
|||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||||
include:
|
include:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
# pyinstaller-build-options: --target-arch=64bit
|
executable: sc64deployer.exe
|
||||||
# pyinstaller-options: --onefile --console --icon ../../assets/sc64_logo_256_256.png
|
name: sc64deployer-windows
|
||||||
executable-name: sc64deployer.exe
|
options: -c -a -f
|
||||||
package-name: sc64deployer-windows
|
extension: zip
|
||||||
# package-options: -c -a -f
|
|
||||||
# package-extension: zip
|
|
||||||
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
# pyinstaller-options: --onefile
|
|
||||||
linux-packages: libudev-dev
|
linux-packages: libudev-dev
|
||||||
executable-name: sc64deployer
|
executable: sc64deployer
|
||||||
package-name: sc64deployer-linux
|
name: sc64deployer-linux
|
||||||
# package-options: -czf
|
options: -czf
|
||||||
# package-extension: tar.gz
|
extension: tar.gz
|
||||||
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
# pyinstaller-options: --onedir --console --icon ../../assets/sc64_logo_256_256.png
|
executable: sc64deployer
|
||||||
executable-name: sc64deployer
|
name: sc64deployer-macos
|
||||||
package-name: sc64deployer-macos
|
options: -czf
|
||||||
# package-options: -czf
|
extension: tgz
|
||||||
# package-extension: tgz
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@ -83,15 +79,15 @@ jobs:
|
|||||||
- name: Download SummerCart64 repository
|
- name: Download SummerCart64 repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set SC64 version
|
- name: Set package version
|
||||||
uses: frabert/replace-string-action@v2
|
uses: frabert/replace-string-action@v2
|
||||||
id: sc64version
|
id: version
|
||||||
with:
|
with:
|
||||||
pattern: '\/'
|
pattern: '\/'
|
||||||
string: '-${{ github.ref_name }}'
|
string: '-${{ github.ref_name }}'
|
||||||
replace-with: '-'
|
replace-with: '-'
|
||||||
|
|
||||||
- name: Install required linux packages
|
- name: Install linux packages
|
||||||
if: matrix.linux-packages
|
if: matrix.linux-packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -101,54 +97,24 @@ jobs:
|
|||||||
run: cargo b -r
|
run: cargo b -r
|
||||||
working-directory: sw/deployer
|
working-directory: sw/deployer
|
||||||
|
|
||||||
# - name: Setup python
|
- name: Package executable
|
||||||
# uses: actions/setup-python@v4
|
run: |
|
||||||
# with:
|
mkdir package
|
||||||
# python-version: '3.11'
|
cd target/release
|
||||||
|
tar ${{ matrix.options }} \
|
||||||
# - name: Download pyinstaller repository
|
../../package/${{ matrix.name }}${{ steps.version.outputs.replaced }}.${{ matrix.extension }} \
|
||||||
# uses: actions/checkout@v3
|
${{ matrix.executable }}
|
||||||
# with:
|
working-directory: sw/deployer
|
||||||
# repository: 'pyinstaller/pyinstaller'
|
|
||||||
# ref: 'v5.8.0'
|
|
||||||
# path: pyinstaller
|
|
||||||
|
|
||||||
# - name: Compile and install pyinstaller
|
|
||||||
# run: |
|
|
||||||
# pip3 uninstall pyinstaller
|
|
||||||
# pip3 install wheel
|
|
||||||
# pushd bootloader
|
|
||||||
# python3 ./waf all ${{ matrix.pyinstaller-build-options }}
|
|
||||||
# popd
|
|
||||||
# pip3 install .
|
|
||||||
# working-directory: pyinstaller
|
|
||||||
|
|
||||||
# - name: Install sc64.py requirements
|
|
||||||
# run: pip3 install -r requirements.txt
|
|
||||||
# working-directory: sw/pc
|
|
||||||
|
|
||||||
# - name: Create sc64.py executable
|
|
||||||
# run: python3 -m PyInstaller --clean ${{ matrix.pyinstaller-options }} sc64.py
|
|
||||||
# working-directory: sw/pc
|
|
||||||
|
|
||||||
# - name: Package executable
|
|
||||||
# run: |
|
|
||||||
# mkdir package
|
|
||||||
# pushd dist
|
|
||||||
# tar ${{ matrix.package-options }} ../package/${{ matrix.package-name }}${{ steps.sc64version.outputs.replaced }}.${{ matrix.package-extension }} *
|
|
||||||
# popd
|
|
||||||
# working-directory: sw/pc
|
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.package-name }}${{ steps.sc64version.outputs.replaced }}
|
name: ${{ matrix.name }}${{ steps.version.outputs.replaced }}
|
||||||
path: sw/deployer/target/release/${{ matrix.executable-name }}
|
path: sw/deployer/package/${{ matrix.name }}${{ steps.version.outputs.replaced }}.${{ matrix.extension }}
|
||||||
# path: sw/pc/package/${{ matrix.package-name }}${{ steps.sc64version.outputs.replaced }}.${{ matrix.package-extension }}
|
|
||||||
|
|
||||||
# - name: Upload release assets
|
- name: Upload release assets
|
||||||
# if: github.event_name == 'release' && github.event.action == 'created'
|
if: github.event_name == 'release' && github.event.action == 'created'
|
||||||
# uses: softprops/action-gh-release@v0.1.15
|
uses: softprops/action-gh-release@v0.1.15
|
||||||
# with:
|
with:
|
||||||
# files: |
|
files: |
|
||||||
# sw/pc/package/${{ matrix.package-name }}${{ steps.sc64version.outputs.replaced }}.${{ matrix.package-extension }}
|
sw/deployer/package/${{ matrix.name }}${{ steps.version.outputs.replaced }}.${{ matrix.extension }}
|
||||||
|
@ -9,7 +9,7 @@ use colored::Colorize;
|
|||||||
use panic_message::panic_message;
|
use panic_message::panic_message;
|
||||||
use std::{
|
use std::{
|
||||||
fs::File,
|
fs::File,
|
||||||
io::{self, BufReader, Read, Write},
|
io::{stdout, BufReader, Read, Write},
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicBool, Ordering},
|
atomic::{AtomicBool, Ordering},
|
||||||
@ -518,7 +518,7 @@ fn init_sc64(sn: Option<String>, check_firmware: bool) -> Result<sc64::SC64, sc6
|
|||||||
|
|
||||||
fn log_wait<F: FnOnce() -> Result<T, E>, T, E>(message: String, operation: F) -> Result<T, E> {
|
fn log_wait<F: FnOnce() -> Result<T, E>, T, E>(message: String, operation: F) -> Result<T, E> {
|
||||||
print!("{}... ", message);
|
print!("{}... ", message);
|
||||||
io::stdout().flush().unwrap();
|
stdout().flush().unwrap();
|
||||||
let result = operation();
|
let result = operation();
|
||||||
println!("done");
|
println!("done");
|
||||||
result
|
result
|
||||||
|
Loading…
Reference in New Issue
Block a user