-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
61 additions
and
400 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
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
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,164 +1,26 @@ | ||
# DO NOT EDIT THIS FILE BY HAND. | ||
# | ||
# This file was generated by .github/workflows/update.sh automagically. | ||
name: CI | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release | ||
- trial-* | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
linux-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Cache for external projects | ||
uses: actions/cache@v3 | ||
with: | ||
path: build/vendor | ||
key: ${{ runner.os }}-linux-build-${{ hashFiles('CMakeLists.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-linux-build- | ||
- name: Install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends autoconf automake cmake dos2unix g++ libtool make ninja-build pkg-config | ||
- name: Generate project files | ||
run: | | ||
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release -D MIRAKC_ARIB_TEST=ON | ||
- name: Build vendor libraries | ||
run: | | ||
ninja -C build vendor | ||
- name: Build | ||
run: | | ||
ninja -C build | ||
- name: Show help and version | ||
run: | | ||
build/bin/mirakc-arib -h | ||
build/bin/mirakc-arib --version | ||
- name: Run test | ||
run: | | ||
ninja -C build test | ||
ninja -C build cli-tests | ||
#macos-build: | ||
arm-linux-build: | ||
strategy: | ||
matrix: | ||
arch: | ||
# Disabled because there is no linux/arm/v5 image of ubuntu. | ||
# - armel | ||
- armhf | ||
- arm64 | ||
include: | ||
# - arch: armel | ||
# host-triple: arm-linux-gnueabi | ||
# elf-machine: 'ARM' | ||
# elf-flags: 'soft-float' | ||
# docker-platform: linux/arm/v5 | ||
- arch: armhf | ||
host-triple: arm-linux-gnueabihf | ||
elf-machine: 'ARM' | ||
elf-flags: 'hard-float' | ||
docker-platform: linux/arm/v7 | ||
- arch: arm64 | ||
host-triple: aarch64-linux-gnu | ||
elf-machine: 'AArch64' | ||
elf-flags: '' | ||
docker-platform: linux/arm64/v8 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Cache for external projects | ||
uses: actions/cache@v3 | ||
with: | ||
path: build/vendor | ||
key: ${{ runner.os }}-arm-build-${{ matrix.arch }}-${{ hashFiles('CMakeLists.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-arm-build-${{ matrix.arch }}- | ||
- name: Install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends autoconf automake cmake dos2unix g++-${{ matrix.host-triple }} libtool make ninja-build pkg-config | ||
- name: Generate project files | ||
run: | | ||
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release -D MIRAKC_ARIB_TEST=ON -D CMAKE_TOOLCHAIN_FILE=toolchain.cmake.d/debian-${{ matrix.arch }}.cmake . | ||
- name: Build vendor libraries | ||
run: | | ||
ninja -C build vendor | ||
- name: Build | ||
run: | | ||
ninja -C build | ||
- name: Check the binary format | ||
run: | | ||
readelf -h build/bin/mirakc-arib | grep Machine | grep '${{ matrix.elf-machine }}' | ||
readelf -h build/bin/mirakc-arib | grep Flags | grep '${{ matrix.elf-flags }}' | ||
- name: Setup QEMU user-mode emulation | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Show help and version | ||
run: | | ||
sudo apt-get install -y --no-install-recommends lsb-release | ||
docker run --rm -v $(pwd)/build:/build --platform ${{ matrix.docker-platform }} ubuntu:$(lsb_release -cs) /build/bin/mirakc-arib -h | ||
docker run --rm -v $(pwd)/build:/build --platform ${{ matrix.docker-platform }} ubuntu:$(lsb_release -cs) /build/bin/mirakc-arib --version | ||
- name: Run tests | ||
run: | | ||
docker run --rm -e CI=$CI -v $(pwd)/build:/build --platform ${{ matrix.docker-platform }} ubuntu:$(lsb_release -cs) /build/bin/mirakc-arib-test --gtest_shuffle | ||
docker run --rm -e CI=$CI -v $(pwd)/build:/build -v $(pwd)/test:/test --platform ${{ matrix.docker-platform }} ubuntu:$(lsb_release -cs) sh /test/cli_tests.sh /build/bin/mirakc-arib | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
cross-build: | ||
uses: ./.github/workflows/cross-build.yml | ||
secrets: inherit | ||
# macos-build: | ||
# uses: ./.github/workflows/macos-build.yml | ||
# secrets: inherit | ||
coverage: | ||
needs: | ||
- linux-build | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Cache for external projects | ||
uses: actions/cache@v3 | ||
with: | ||
path: build/vendor | ||
key: ${{ runner.os }}-coverage-${{ hashFiles('CMakeLists.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-coverage- | ||
- name: Cache for grcov | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
key: ${{ runner.os }}-grcov | ||
- name: Install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends autoconf automake cmake dos2unix g++ libtool make ninja-build pkg-config | ||
- name: Generate project files | ||
run: | | ||
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Debug -D MIRAKC_ARIB_TEST=ON -D MIRAKC_ARIB_COVERAGE=ON | ||
- name: Build vendor libraries | ||
run: | | ||
ninja -C build vendor | ||
- name: Build | ||
run: | | ||
ninja -C build | ||
- name: Run test | ||
run: | | ||
ninja -C build test | ||
ninja -C build cli-tests | ||
- name: Install cargo-binstall | ||
run: | | ||
BINSTALL_URL=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
curl -fsSL $BINSTALL_URL | tar -xz -C ~/.cargo/bin --no-same-owner | ||
- name: Install grcov | ||
run: | | ||
cargo binstall --no-confirm grcov | ||
- name: Generate coverage data | ||
run: >- | ||
grcov build --branch --llvm --ignore-not-existing -s . -p .. --ignore 'test/*' -t lcov -o lcov.info | ||
- name: Update to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info | ||
- build | ||
uses: ./.github/workflows/coverage.yml | ||
secrets: inherit |
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,4 +1,4 @@ | ||
name: clang-format Check | ||
name: clang-format-check | ||
on: [push, pull_request] | ||
jobs: | ||
formatting-check: | ||
|
5 changes: 5 additions & 0 deletions
5
.github/workflows/templates/coverage.job.yml → .github/workflows/coverage.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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
name: coverage | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
|
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
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
5 changes: 5 additions & 0 deletions
5
...b/workflows/templates/macos-build.job.yml → .github/workflows/macos-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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
name: macos-build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
macos-build: | ||
runs-on: macos-latest | ||
|
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.