-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for
actions/cache
(#22)
- Loading branch information
Showing
24 changed files
with
96,042 additions
and
32,782 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 |
---|---|---|
@@ -1,89 +1,114 @@ | ||
name: CMake | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/test-cmake.yml" | ||
- "dist/**" | ||
- "action.yml" | ||
- "test/**" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/test-cmake.yml" | ||
- "dist/**" | ||
- "action.yml" | ||
- "test/**" | ||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/test-cmake.yml' | ||
- 'dist/**' | ||
- 'action.yml' | ||
- 'test/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/test-cmake.yml' | ||
- 'dist/**' | ||
- 'action.yml' | ||
- 'test/**' | ||
|
||
env: | ||
BUILD_TYPE: Debug | ||
BUILD_TYPE: Debug | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-20.04 | ||
COMPILER: gcc | ||
PLATFORM: 20.04 | ||
ARCH: x86 | ||
- os: ubuntu-20.04 | ||
COMPILER: gcc | ||
PLATFORM: 20.04 | ||
ARCH: aarch64 | ||
- os: windows-2019 | ||
COMPILER: msvc | ||
PLATFORM: 2019 | ||
ARCH: x86 | ||
- os: windows-2019 | ||
COMPILER: mingw | ||
PLATFORM: 2019 | ||
ARCH: x86 | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.79.0 | ||
platform_version: ${{matrix.PLATFORM}} | ||
toolset: ${{matrix.COMPILER}} | ||
arch: ${{matrix.ARCH}} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-20.04 | ||
COMPILER: gcc | ||
PLATFORM: 20.04 | ||
ARCH: x86 | ||
cache: false | ||
- os: ubuntu-20.04 | ||
COMPILER: gcc | ||
PLATFORM: 20.04 | ||
ARCH: aarch64 | ||
cache: false | ||
- os: windows-2019 | ||
COMPILER: msvc | ||
PLATFORM: 2019 | ||
ARCH: x86 | ||
cache: false | ||
- os: windows-2019 | ||
COMPILER: mingw | ||
PLATFORM: 2019 | ||
ARCH: x86 | ||
cache: false | ||
- os: ubuntu-20.04 | ||
COMPILER: gcc | ||
PLATFORM: 20.04 | ||
ARCH: x86 | ||
cache: true | ||
- os: ubuntu-20.04 | ||
COMPILER: gcc | ||
PLATFORM: 20.04 | ||
ARCH: aarch64 | ||
cache: true | ||
- os: windows-2019 | ||
COMPILER: msvc | ||
PLATFORM: 2019 | ||
ARCH: x86 | ||
cache: true | ||
- os: windows-2019 | ||
COMPILER: mingw | ||
PLATFORM: 2019 | ||
ARCH: x86 | ||
cache: true | ||
|
||
- name: Setup MinGW | ||
uses: egor-tensin/setup-mingw@v2 | ||
if: ${{runner.os == 'Windows' && matrix.COMPILER == 'mingw'}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.79.0 | ||
platform_version: ${{matrix.PLATFORM}} | ||
toolset: ${{matrix.COMPILER}} | ||
arch: ${{matrix.ARCH}} | ||
cache: ${{matrix.cache}} | ||
|
||
- name: Install arm64 compiler | ||
run: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y | ||
if: matrix.ARCH == 'aarch64' | ||
- name: Setup MinGW | ||
uses: egor-tensin/setup-mingw@v2 | ||
if: ${{runner.os == 'Windows' && matrix.COMPILER == 'mingw'}} | ||
|
||
- name: Configure CMake mingw | ||
shell: bash | ||
working-directory: test | ||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -G "MinGW Makefiles" -B build | ||
if: ${{matrix.COMPILER == 'mingw'}} | ||
env: | ||
BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} | ||
- name: Install arm64 compiler | ||
run: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y | ||
if: matrix.ARCH == 'aarch64' | ||
|
||
- name: Configure CMake arm64 | ||
shell: bash | ||
working-directory: test | ||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ARM_BINARIES=1 -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build | ||
if: matrix.ARCH == 'aarch64' | ||
env: | ||
BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} | ||
- name: Configure CMake mingw | ||
shell: bash | ||
working-directory: test | ||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -G "MinGW Makefiles" -B build | ||
if: ${{matrix.COMPILER == 'mingw'}} | ||
env: | ||
BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: test | ||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build | ||
if: ${{matrix.COMPILER != 'mingw' && matrix.ARCH != 'aarch64'}} | ||
env: | ||
BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} | ||
- name: Build | ||
working-directory: test/build | ||
shell: bash | ||
run: cmake --build . --config $BUILD_TYPE | ||
- name: Configure CMake arm64 | ||
shell: bash | ||
working-directory: test | ||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ARM_BINARIES=1 -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build | ||
if: matrix.ARCH == 'aarch64' | ||
env: | ||
BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: test | ||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build | ||
if: ${{matrix.COMPILER != 'mingw' && matrix.ARCH != 'aarch64'}} | ||
env: | ||
BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} | ||
- name: Build | ||
working-directory: test/build | ||
shell: bash | ||
run: cmake --build . --config $BUILD_TYPE |
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 |
---|---|---|
@@ -1,79 +1,81 @@ | ||
name: test | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- ".github/workflows/test.yml" | ||
- "dist/**" | ||
- "action.yml" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/test-cmake.yml" | ||
- "dist/**" | ||
- "action.yml" | ||
- "test/**" | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- '.github/workflows/test.yml' | ||
- 'dist/**' | ||
- 'action.yml' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/test-cmake.yml' | ||
- 'dist/**' | ||
- 'action.yml' | ||
- 'test/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.73.0 | ||
- name: List contents of boost directory | ||
run: ls | ||
working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" | ||
shell: bash | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
build-custom-install-dir-ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.73.0 | ||
boost_install_dir: '/home/runner' | ||
- name: List contents of boost directory | ||
run: ls | ||
working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" | ||
shell: bash | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
build-custom-install-dir-windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.73.0 | ||
boost_install_dir: 'C:/' | ||
- name: List contents of boost directory | ||
run: ls | ||
working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.73.0 | ||
- name: List contents of boost directory | ||
run: ls | ||
working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" | ||
shell: bash | ||
|
||
build-custom-install-dir-ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.73.0 | ||
boost_install_dir: '/home/runner' | ||
cache: false | ||
- name: List contents of boost directory | ||
run: ls | ||
working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" | ||
shell: bash | ||
|
||
build-custom-install-dir-windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install boost | ||
uses: ./ | ||
id: install-boost | ||
with: | ||
boost_version: 1.73.0 | ||
boost_install_dir: 'C:/' | ||
cache: false | ||
- name: List contents of boost directory | ||
run: ls | ||
working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
shell: bash | ||
- run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" | ||
shell: bash |
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,5 @@ | ||
dist/ | ||
node_modules/ | ||
.vscode/ | ||
test/ | ||
package-lock.json |
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
Oops, something went wrong.