Fix snap package depdencencies (#909)

* change the confinement

* fix Cargo.toml

* fix snap package

* new name

Co-authored-by: AnhQuan Nguyen <j4qfrost@gmail.com>
macos-click-through
leon332157 3 years ago committed by GitHub
parent c23c176c00
commit 1e8f4aacf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,232 +4,228 @@ on: [push]
jobs: jobs:
build-windows: build-windows:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Nightly Toolchain - name: Install Nightly Toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
run: | run: |
cargo install cargo2junit cargo install cargo2junit
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- name: Check Formatting - name: Check Formatting
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Install Neovim - name: Install Neovim
run: | run: |
choco install -y neovim choco install -y neovim
- name: Test - name: Test
env: env:
NEOVIM_BIN: "C:/tools/neovim/Neovim/bin/nvim.exe" NEOVIM_BIN: "C:/tools/neovim/Neovim/bin/nvim.exe"
RUST_BACKTRACE: full RUST_BACKTRACE: full
run: | run: |
cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml
- name: Publish Test Results - name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1 uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always() if: always()
with: with:
files: results.xml files: results.xml
- name: Build Release - name: Build Release
run: | run: |
cargo build --release cargo build --release
- name: Archive Windows artifact - name: Archive Windows artifact
run: | run: |
powershell rm ./target/release/neovide.zip powershell rm ./target/release/neovide.zip
powershell Compress-Archive ./target/release/neovide.exe ./target/release/neovide.zip powershell Compress-Archive ./target/release/neovide.exe ./target/release/neovide.zip
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: neovide-windows.zip name: neovide-windows.zip
path: ./target/release/neovide.zip path: ./target/release/neovide.zip
build-mac: build-mac:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Nightly Toolchain - name: Install Nightly Toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
run: | run: |
cargo install cargo2junit cargo install cargo2junit
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- name: Check Formatting - name: Check Formatting
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Uninstall Conflicting LLVM - name: Uninstall Conflicting LLVM
run: | run: |
brew uninstall llvm brew uninstall llvm
- name: Install Neovim - name: Install Neovim
run: | run: |
brew install neovim brew install neovim
- name: Test - name: Test
env: env:
RUST_BACKTRACE: full RUST_BACKTRACE: full
run: | run: |
cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml
- name: Publish Test Results - name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1 uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always() if: always()
with: with:
files: results.xml files: results.xml
- name: Build Release - name: Build Release
run: | run: |
cargo build --release cargo build --release
cargo install cargo-bundle cargo install cargo-bundle
cargo bundle --release cargo bundle --release
- name: Create .dmg file - name: Create .dmg file
run: | run: |
hdiutil create Neovide-uncompressed.dmg -volname "Neovide" -srcfolder target/release/bundle/osx hdiutil create Neovide-uncompressed.dmg -volname "Neovide" -srcfolder target/release/bundle/osx
hdiutil convert Neovide-uncompressed.dmg -format UDZO -o Neovide.dmg hdiutil convert Neovide-uncompressed.dmg -format UDZO -o Neovide.dmg
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: Neovide.dmg name: Neovide.dmg
path: ./Neovide.dmg path: ./Neovide.dmg
build-linux: build-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Nightly Toolchain - name: Install Nightly Toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
run: | run: |
cargo install cargo2junit cargo install cargo2junit
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- name: Install Dependencies - name: Install Dependencies
run: | run: |
sudo apt-get install -y curl gnupg ca-certificates git gcc-multilib g++-multilib cmake libssl-dev pkg-config libfreetype6-dev libasound2-dev libexpat1-dev libxcb-composite0-dev libbz2-dev freeglut3-dev libxi-dev sudo apt-get install -y curl gnupg ca-certificates git gcc-multilib g++-multilib cmake libssl-dev pkg-config libfreetype6-dev libasound2-dev libexpat1-dev libxcb-composite0-dev libbz2-dev freeglut3-dev libxi-dev
- name: Check Formatting - name: Check Formatting
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Install Neovim - name: Install Neovim
run: | run: |
sudo apt-get install -y neovim sudo apt-get install -y neovim
- name: Test - name: Test
env: env:
RUST_BACKTRACE: full RUST_BACKTRACE: full
run: | run: |
cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml
- name: Publish Test Results - name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v1 uses: EnricoMi/publish-unit-test-result-action@v1
if: always() if: always()
with: with:
files: results.xml files: results.xml
- name: Build Release - name: Build Release
run: | run: |
cargo build --release cargo build --release
- name: Archive Linux artifact - name: Archive Linux artifact
run: | run: |
tar czvf ./target/release/neovide.tar.gz ./target/release/neovide tar czvf ./target/release/neovide.tar.gz ./target/release/neovide
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: neovide-linux.tar.gz name: neovide-linux.tar.gz
path: ./target/release/neovide.tar.gz path: ./target/release/neovide.tar.gz
build-m1: build-m1:
runs-on: self-hosted runs-on: self-hosted
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Nightly Toolchain - name: Install Nightly Toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
run: | run: |
cargo install cargo2junit cargo install cargo2junit
- name: Check Formatting - name: Check Formatting
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Install Neovim - name: Install Neovim
run: | run: |
arch -arm64 brew install neovim arch -arm64 brew install neovim
- name: Test - name: Test
env: env:
RUST_BACKTRACE: full RUST_BACKTRACE: full
run: | run: |
cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml cargo test -- -- -Z unstable-options --format json | cargo2junit > results.xml
- name: Publish Test Results - name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1 uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always() if: always()
continue-on-error: true continue-on-error: true
with: with:
files: results.xml files: results.xml
- name: Build Release - name: Build Release
run: | run: |
cargo build --release cargo build --release
cargo install cargo-bundle cargo install cargo-bundle
cargo bundle --release cargo bundle --release
- name: Create .dmg file - name: Create .dmg file
run: | run: |
hdiutil create Neovide-uncompressed.dmg -volname "Neovide" -srcfolder target/release/bundle/osx hdiutil create Neovide-uncompressed.dmg -volname "Neovide" -srcfolder target/release/bundle/osx
hdiutil convert Neovide-uncompressed.dmg -format UDZO -o Neovide.dmg hdiutil convert Neovide-uncompressed.dmg -format UDZO -o Neovide.dmg
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: Neovide-m1.dmg name: Neovide-m1.dmg
path: ./Neovide.dmg path: ./Neovide.dmg

@ -0,0 +1,32 @@
name: Releases
on:
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
jobs:
snap:
runs-on: ubuntu-20.04
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: snapcore/action-build@v1
env:
SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY: 6G
id: snapcraft
- uses: actions/upload-artifact@v2
with:
name: snap
path: ${{ steps.snapcraft.outputs.snap }}
- uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
snap: ${{ steps.snapcraft.outputs.snap }}

@ -2,27 +2,27 @@ name: Snap
on: on:
push: push:
branches: [ main ] branches: [main]
jobs: jobs:
snap: snap:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- name: Check out Git repository - name: Check out Git repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: snapcore/action-build@v1 - uses: snapcore/action-build@v1
env: env:
SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY: 6G SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY: 6G
id: snapcraft id: snapcraft
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: snap name: snap
path: ${{ steps.snapcraft.outputs.snap }} path: ${{ steps.snapcraft.outputs.snap }}
- uses: snapcore/action-publish@v1 - uses: snapcore/action-publish@v1
with: with:
store_login: ${{ secrets.SNAPCRAFT_TOKEN }} store_login: ${{ secrets.SNAPCRAFT_EDGE_TOKEN }}
snap: ${{ steps.snapcraft.outputs.snap }} snap: ${{ steps.snapcraft.outputs.snap }}

@ -1,5 +1,5 @@
name: neovide # you probably want to 'snapcraft register <name>' name: neovide # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap base: core20 # the base snap is the execution environment for this snap
version: "0.8.0+git" version: "0.8.0+git"
summary: The snappiest vim editor you are likely to find. summary: The snappiest vim editor you are likely to find.
description: | description: |
@ -7,7 +7,7 @@ description: |
but it should act functionally like the terminal UI. but it should act functionally like the terminal UI.
grade: stable # must be 'stable' to release into candidate/stable channels grade: stable # must be 'stable' to release into candidate/stable channels
confinement: classic # use 'strict' once you have the right plugs and slots confinement: strict # use 'strict' once you have the right plugs and slots
build-packages: build-packages:
- cmake - cmake
- freeglut3-dev - freeglut3-dev
@ -91,6 +91,10 @@ parts:
- libfontconfig1-dev - libfontconfig1-dev
- libfreetype6-dev - libfreetype6-dev
stage-packages: stage-packages:
- libxkbcommon0
- libxkbcommon-x11-0
- libegl1-mesa-dev
- libgl1-mesa-dev
- fontconfig - fontconfig
- fonts-noto - fonts-noto
- libfontconfig1 - libfontconfig1

Loading…
Cancel
Save