build #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ '*' ] | |
tags: | |
- v* | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Build | |
run: | | |
apt-get install -y libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libxtst-dev libxrandr-dev libxcomposite-dev libxi-dev libxv-dev autoconf libtool-bin nvidia-cuda-dev pkg-config libdrm-dev libpango1.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdbus-1-dev | |
cargo b --features ffmpeg-system --release | |
build-macos: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: deps/dist | |
key: ${{ runner.os }}-deps-${{ hashFiles('deps/*') }} | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
- name: Download deps | |
run: | | |
npm install -g typescript | |
brew install nasm | |
cargo install cargo-bundle | |
shell: bash | |
- name: Build | |
# run: MACOSX_DEPLOYMENT_TARGET=10.13 cargo bundle --release | |
run: cargo bundle --release | |
- name: Package | |
run: cd target/release/bundle/osx/ && zip -r macOS.zip Weylus.app | |
- name: Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ runner.os }} | |
path: | | |
target/release/bundle/osx/macOS.zip | |
- name: ArtifactsDebug | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ runner.os }}-ffbuild | |
path: | | |
deps/ffmpeg/ffbuild | |
- name: Debug via SSH | |
if: failure() | |
uses: luchihoratiu/debug-via-ssh@main | |
with: | |
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} | |
SSH_PASS: ${{ secrets.SSH_PASS }} | |
NGROK_REGION: eu | |
- name: Publish | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
target/release/bundle/osx/macOS.zip | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |