Skip to content

Commit

Permalink
ci: compile to appimage
Browse files Browse the repository at this point in the history
closes #10
  • Loading branch information
cecilia-sanare committed Mar 22, 2024
1 parent f33ab58 commit be389f5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ jobs:
if: matrix.build == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev
sudo apt-get install -y libssl-dev desktop-file-utils zsync libfuse2
- name: Download AppImageKit
run: |
curl -L https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -o ./appimagetool.AppImage
chmod +x ./appimagetool.AppImage
mkdir -p $HOME/.local/bin
mv ./appimagetool.AppImage $HOME/.local/bin/appimagetool
# /home/runner/.local/bin

- uses: cachix/install-nix-action@v18
with:
Expand All @@ -56,17 +65,20 @@ jobs:
- name: Build
run: cargo build -r --target ${{ matrix.target }} --locked

- name: Install Cargo Tools
run: cargo install cargo-deb cargo-generate-rpm cargo-appimage

- name: Build Deb (linux)
if: matrix.build == 'linux'
run: |
cargo install cargo-deb
cargo deb -o protontweaks.deb
run: cargo deb -o protontweaks.deb

- name: Build RPM (linux)
if: matrix.build == 'linux'
run: |
cargo install cargo-generate-rpm
cargo generate-rpm -o protontweaks.rpm
run: cargo generate-rpm -o protontweaks.rpm

- name: Build AppImage (linux)
if: matrix.build == 'linux'
run: cargo appimage

- name: Rename Binaries (linux / macos)
if: matrix.build != 'windows'
Expand All @@ -78,6 +90,7 @@ jobs:
path: |
target/${{ matrix.target }}/release/protontweaks.exe
target/${{ matrix.target }}/release/protontweaks-${{ matrix.target }}
target/appimage/protontweaks.AppImage
protontweaks.deb
protontweaks.rpm
Expand All @@ -88,5 +101,6 @@ jobs:
files: |
target/${{ matrix.target }}/release/protontweaks.exe
target/${{ matrix.target }}/release/protontweaks-${{ matrix.target }}
target/appimage/protontweaks.AppImage
protontweaks.deb
protontweaks.rpm
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ lcov.info
*.rpm
.protontweaks.json
tests/.configs/
icon.png
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ validate:
killall steam && sleep 5 || true
nix build
nix shell --command steam

validate-appimage:
cargo appimage
appimage-run ./target/appimage/protontweaks.AppImage --version
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ let
gcc
rustfmt
clippy
appimagekit
appimage-run
];

system = {
Expand Down

0 comments on commit be389f5

Please sign in to comment.