name: Build-and-Test on: [push] jobs: build-windows: runs-on: windows-latest steps: - uses: actions/checkout@v2 - name: Check formatting run: | cargo fmt --all -- --check - name: Install Neovim run: | choco install -y neovim - name: Test env: NEOVIM_BIN: "C:/tools/neovim/Neovim/bin/nvim.exe" RUST_BACKTRACE: full run: | cargo test - name: Build Release run: | cargo build --release - uses: actions/upload-artifact@v1 with: name: neovide-windows.exe path: ./target/release/neovide.exe build-mac: runs-on: macos-latest steps: - uses: actions/checkout@v2 - name: Install Vulkan SDK run: brew cask install apenngrace/vulkan/vulkan-sdk - name: Check formatting run: | rustup component add rustfmt --toolchain stable-x86_64-apple-darwin cargo fmt --all -- --check - name: Uninstall Conflicting LLVM run: | brew uninstall llvm - name: Install Neovim run: | brew install neovim - name: Test run: | RUST_BACKTRACE=full cargo test - name: Build Release run: | cargo build --release cargo install cargo-bundle cargo bundle --release - name: Update Bundle run: | cd target/release/bundle/osx/Neovide.app/Contents mkdir Frameworks cp /usr/local/lib/libvulkan.dylib ./Frameworks/ cp /usr/local/lib/libMoltenVK.dylib ./Frameworks/ mkdir -p Resources/vulkan cp -r /usr/local/share/vulkan/icd.d ./Resources/vulkan/ jq '.ICD.library_path = "../../../Frameworks/libMoltenVK.dylib"' ./Resources/vulkan/icd.d/MoltenVK_icd.json > MoltenVK_icd.json mv MoltenVK_icd.json ./Resources/vulkan/icd.d/ install_name_tool -add_rpath "@executable_path/../Frameworks" ./MacOS/neovide - uses: actions/upload-artifact@v1 with: name: Neovide.app path: ./target/release/bundle/osx build-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Vulkan SDK run: | curl -sL "http://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add - sudo curl -sLo "/etc/apt/sources.list.d/lunarg-vulkan-1.2.131-bionic.list" "http://packages.lunarg.com/vulkan/1.2.131/lunarg-vulkan-1.2.131-bionic.list" sudo apt-get update -y --ignore-missing sudo apt-get install -y vulkan-sdk - name: Install dependencies 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 libsdl2-dev - name: Check formatting run: | cargo fmt --all -- --check - name: Install Neovim run: | sudo apt-get install -y neovim - name: Test run: | RUST_BACKTRACE=full cargo test - name: Build Release run: | cargo build --release - uses: actions/upload-artifact@v1 with: name: neovide-linux path: ./target/release/neovide