Skip to content

Commit

Permalink
Merge branch 'ci'
Browse files Browse the repository at this point in the history
Closes #514
  • Loading branch information
lotem committed Jan 15, 2022
2 parents a3fdad8 + 3ae72a3 commit 6149f08
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 259 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/commit-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: commit ci
on: [push]
jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [g++, clang]
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: ./action-install-linux.sh

- name: Unit test
run: make test
macos:
runs-on: macos-latest
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: ./action-install-macos.sh

- name: Unit test
run: make xcode/test
windows:
runs-on: windows-latest
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: .\action-install-windows.bat

- name: Unit test
run: .\build.bat test
49 changes: 49 additions & 0 deletions .github/workflows/pull-request-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: pull request ci
on: [pull_request]
jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [g++, clang]
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: ./action-install-linux.sh

- name: Unit test
run: make test
macos:
runs-on: macos-latest
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: ./action-install-macos.sh

- name: Unit test
run: make xcode/test
windows:
runs-on: windows-latest
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: .\action-install-windows.bat

- name: Unit test
run: .\build.bat test
61 changes: 61 additions & 0 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: release ci
on:
push:
tags:
- "*"
jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [g++, clang]
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: ./action-install-linux.sh

- name: Unit test
run: make test

- name: Upload artifactory
run: echo TODO
macos:
runs-on: macos-latest
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: ./action-install-macos.sh

- name: Unit test
run: make xcode/test xcode/dist

- name: Upload artifactory
run: echo TODO
windows:
runs-on: windows-latest
steps:
- name: Checkout last commit
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install dependency
run: .\action-install-windows.bat

- name: Unit test
run: .\build.bat test

- name: Upload artifactory
run: echo TODO
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

File renamed without changes.
25 changes: 25 additions & 0 deletions action-install-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

export boost_version="${boost_version=1.75.0}"
boost_x_y_z="${boost_version//./_}"

export BOOST_ROOT="${BOOST_ROOT=$(pwd)/thirdparty/src/boost_${boost_x_y_z}}"

# TODO: cache dependencies

# install and build boost
make xcode/thirdparty/boost

make xcode/thirdparty

if [[ -n "${RIME_PLUGINS}" ]]; then
# intentionally unquoted: ${RIME_PLUGINS} is a space separated list of slugs
bash ./install-plugins.sh ${RIME_PLUGINS}
for plugin_dir in plugins/*; do
if [[ -e "${plugin_dir}/action-install.sh" ]]; then
(cd "${plugin_dir}"; bash ./action-install.sh)
fi
done
fi

make xcode
45 changes: 45 additions & 0 deletions action-install-windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
setlocal

if not defined boost_version set boost_version=1.76.0
set boost_x_y_z=%boost_version:.=_%

if not defined BOOST_ROOT set BOOST_ROOT=C:\Libraries\boost_%boost_x_y_z%

if exist "%BOOST_ROOT%\boost" goto boost_found
rem download boost source
aria2c https://boostorg.jfrog.io/artifactory/main/release/%boost_version%/source/boost_%boost_x_y_z%.7z -d C:\Libraries
pushd C:\Libraries
7z x boost_%boost_x_y_z%.7z
popd C:\Libraries
:boost_found

rem TODO: cache dependencies

call build.bat boost
if errorlevel 1 goto error

call build.bat thirdparty
if errorlevel 1 goto error

if defined RIME_PLUGINS (
for %%s in (%RIME_PLUGINS%) do call :install_plugin %%s
)

goto exit

:error
set exitcode=%errorlevel%

:exit
exit /b %exitcode%

:install_plugin
set slug=%1
echo "plugin: %slug%"
set plugin_project=%slug:*/=%
set plugin_dir=plugins/%plugin_project:librime-=%
git clone --depth 1 "https://github.com/%slug%.git" %plugin_dir%
if exist %plugin_dir%\action.install.bat (
call %plugin_dir%\action.install.bat
)
exit /b
30 changes: 0 additions & 30 deletions appveyor.install.bat

This file was deleted.

74 changes: 0 additions & 74 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit 6149f08

Please sign in to comment.