-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: transition to GitHub-Actions from Travis-CI (#37)
- Loading branch information
1 parent
6761e12
commit 4e1f8e8
Showing
8 changed files
with
1,300 additions
and
701 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
deploy: | ||
description: Whether to build for deployment + Deploy prebuilt binaries | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
arch: [x64, ia32, arm64, arm] | ||
include: | ||
- os: ubuntu-latest | ||
arch: x64 | ||
apt-arch: amd64 | ||
- os: ubuntu-latest | ||
arch: arm64 | ||
apt-arch: arm64 | ||
toolchain-arch: aarch64 | ||
- os: ubuntu-latest | ||
arch: arm | ||
apt-arch: armhf | ||
toolchain-arch: arm | ||
gnu-name: gnueabihf | ||
exclude: | ||
- os: windows-latest | ||
arch: arm64 | ||
- os: windows-latest | ||
arch: arm | ||
- os: ubuntu-latest | ||
arch: ia32 | ||
- os: macos-latest | ||
arch: ia32 | ||
- os: macos-latest | ||
arch: arm | ||
|
||
name: ${{ matrix.os }}-${{ matrix.arch }} | ||
|
||
env: | ||
CC: "${{ matrix.toolchain-arch && format('{0}-linux-{1}-gcc', matrix.toolchain-arch, matrix.gnu-name || 'gnu') || '' }}" | ||
CXX: "${{ matrix.toolchain-arch && format('{0}-linux-{1}-g++', matrix.toolchain-arch, matrix.gnu-name || 'gnu') || '' }}" | ||
|
||
steps: | ||
- name: Check-Out Code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup CMake/Ninja | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install Cross-Build Toolchain | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
if: ${{ runner.os == 'Linux' && matrix.arch != 'x64' }} | ||
with: | ||
packages: crossbuild-essential-${{ matrix.apt-arch }} | ||
version: 1.0 | ||
|
||
- name: Prepare Machine For Cross-Build | ||
if: ${{ runner.os == 'Linux' && matrix.arch != 'x64' }} | ||
run: | | ||
sudo dpkg --add-architecture ${{ matrix.apt-arch }} | ||
sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu#[arch=${{ matrix.apt-arch }}] http://ports.ubuntu.com/ubuntu-ports#g' /etc/apt/sources.list | ||
sudo apt-get update -yq | ||
- name: Install External Dependencies | ||
if: runner.os == 'Linux' | ||
run: sudo apt-get install libasound2:${{ matrix.apt-arch }} libasound2-dev:${{ matrix.apt-arch }} libpulse-dev:${{ matrix.apt-arch }} | ||
|
||
- name: Install Audify Dependencies | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Build Audify | ||
if: ${{ !inputs.deploy }} | ||
run: npm run rebuild -- --arch ${{ matrix.arch }} | ||
|
||
- name: Upload Audify Binaries | ||
if: ${{ !inputs.deploy }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: audify-${{ github.sha }}-release-${{ matrix.os }}-${{ matrix.arch }} | ||
path: build/Release/ | ||
|
||
- name: Build + Deploy Audify Prebuilt Binaries | ||
if: ${{ inputs.deploy }} | ||
run: npm run build-binaries -- -- -- --arch ${{ matrix.arch }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Commit Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "src/**" | ||
- "vendor/**" | ||
- ".gitmodules" | ||
- "CMake**" | ||
- "**.js" | ||
- "**.ts" | ||
- "package-lock.json" | ||
- "tsconfig.json" | ||
- "!docs/**" | ||
|
||
jobs: | ||
commit-build: | ||
uses: ./.github/workflows/build.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
deploy-build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
deploy: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Re-Generate Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "README.md" | ||
- "**.d.ts" | ||
|
||
jobs: | ||
regenerate-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check-Out Code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install Audify Dependencies | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Re-Generate Docs | ||
run: | | ||
rm -rf ./docs | ||
npm run docs | ||
- name: Commit Docs | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "chore: regenerate docs" | ||
file_pattern: "docs" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.