Skip to content

Commit

Permalink
feat(ci): add release & build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Nov 3, 2020
1 parent 4191771 commit 039c3f5
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release CI

on: [push, pull_request]

jobs:
build:
name: ${{ matrix.kind }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]

env:
GH_ACTIONS: true
RUST_BACKTRACE: full

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Install stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Log versions
run: |
rustc --version
cargo --version
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Remove Some Cache
if: matrix.os == 'windows-latest'
run: |
rm target/release/gn_root -Recurse -ErrorAction Ignore
rm target/debug/gn_root -Recurse -ErrorAction Ignore
- name: Install webkit2gtk
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release CI

on:
workflow_dispatch:

jobs:
build:
name: ${{ matrix.kind }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]

env:
GH_ACTIONS: true
RUST_BACKTRACE: full

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Install stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Log versions
run: |
rustc --version
cargo --version
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Remove Some Cache
if: matrix.os == 'windows-latest'
run: |
rm target/release/gn_root -Recurse -ErrorAction Ignore
rm target/debug/gn_root -Recurse -ErrorAction Ignore
- name: Install webkit2gtk
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release

- name: Release Plugin
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "deno_audio release"
draft: true
files: |
target/release/libdeno_audio.dylib
target/release/libdeno_audio.so
target/release/deno_audio.dll

0 comments on commit 039c3f5

Please sign in to comment.