open source publish #48
Workflow file for this run
This file contains hidden or 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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
- "starling-v*-release" | |
- "v*-release" | |
tags: | |
- "v*" | |
- "starling-v*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
ubuntu-codecov: | |
runs-on: ubuntu-latest | |
container: "ubuntu:24.04" | |
steps: | |
- name: Setup container | |
run: | | |
apt-get update | |
apt-get install -y gpg wget curl software-properties-common unzip git cmake build-essential clang llvm | |
- name: Setup container | |
run: | | |
apt-get update | |
apt-get install -y gpg wget curl software-properties-common unzip | |
add-apt-repository -y ppa:git-core/ppa | |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - \ | |
| tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | |
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic-rc main' \ | |
| tee -a /etc/apt/sources.list.d/kitware.list >/dev/null | |
apt-get update | |
apt-get install -y git cmake build-essential clang llvm | |
- name: Checkout source | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
ssh-key: ${{ secrets.SSH_KEY }} | |
- name: Run build | |
env: | |
CC: clang | |
CXX: clang++ | |
TESTENV: codecov | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_ORGANIZATION: swift-nav | |
SONAR_PROJECT_KEY: swift-nav_libswiftnav | |
SONAR_PROJECT_NAME: libswiftnav | |
SONAR_HOST_URL: https://sonarcloud.io | |
SONAR_SCANNER_VERSION: 5.0.1.3006 | |
run: | | |
bash ./ci-build.sh | |
windows: | |
strategy: | |
matrix: | |
include: | |
- { env: "MSVC", arch: "Win32" } | |
- { env: "MSVC", arch: "x64" } | |
- { env: "MinGW" } | |
runs-on: windows-latest | |
steps: | |
- name: Configure git | |
run: git config --global http.postBuffer 1048576000 | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
ssh-key: ${{ secrets.SSH_KEY }} | |
- name: Install CMake | |
run: | | |
choco install -y --no-progress cmake | |
- name: Downgrade MinGW to 6.4.0 (MinGW) | |
if: matrix.env == 'MinGW' | |
run: | | |
choco install -y --no-progress --allow-downgrade --version=6.4.0 mingw | |
- name: Install msys2 packages (MinGW) | |
if: matrix.env == 'MinGW' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
install: git base-devel | |
update: true | |
- name: Run build (MSVC) | |
if: matrix.env == 'MSVC' | |
env: | |
CMAKE_GENERATOR: "Visual Studio 17 2022" | |
run: | | |
cmake -G "$env:CMAKE_GENERATOR" -A ${{ matrix.arch }} -S . -B build; | |
cmake --build build --config Release; | |
bash -c "ls -la ./build/Release/swiftnav.lib || exit 1" | |
- name: Run build (MinGW) | |
if: matrix.env == 'MinGW' | |
env: | |
CMAKE_GENERATOR: "MinGW Makefiles" | |
CC: gcc | |
CXX: g++ | |
run: | | |
cmake -B build -S . -G "$env:CMAKE_GENERATOR"; | |
cmake --build build | |
unix: | |
strategy: | |
matrix: | |
include: | |
- { | |
cc: "gcc-10", | |
cxx: "g++-10", | |
test_suite: "unit", | |
package: "gcc-10 g++-10", | |
runs_on: "ubuntu-latest", | |
container: "ubuntu:24.04", | |
} | |
- { | |
cc: "clang-14", | |
cxx: "clang++-14", | |
test_suite: "lint", | |
package: "clang-14 libc++-dev libc++abi-dev clang-format-14 clang-tidy-14", | |
runs_on: "ubuntu-latest", | |
container: "ubuntu:24.04", | |
} | |
- { | |
cc: "gcc-14", | |
cxx: "g++-14", | |
test_suite: "unit", | |
package: "gcc-14 g++-14", | |
runs_on: "ubuntu-latest", | |
container: "ubuntu:24.04", | |
} | |
- { | |
cc: "clang", | |
cxx: "clang++", | |
test_suite: "unit", | |
runs_on: "macos-latest", | |
container: ~, | |
} | |
runs-on: ${{ matrix.runs_on }} | |
container: ${{ matrix.container }} | |
steps: | |
- name: Setup container | |
if: matrix.container == 'ubuntu:24.04' | |
run: | | |
apt-get update | |
apt-get install -y gpg wget curl software-properties-common zip libeigen3-dev libserialport-dev git cmake build-essential ${{ matrix.package }} | |
- name: Setup container | |
if: matrix.container == 'ubuntu:18.04' | |
run: | | |
apt-get update | |
apt-get install -y gpg wget curl software-properties-common zip | |
add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
add-apt-repository -y ppa:git-core/ppa | |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \ | |
| gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | |
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic-rc main' \ | |
| tee -a /etc/apt/sources.list.d/kitware.list >/dev/null | |
apt-get update | |
apt-get install -y libeigen3-dev libserialport-dev git cmake build-essential ${{ matrix.package }} | |
- name: Checkout source | |
uses: actions/[email protected] | |
with: | |
submodules: recursive | |
ssh-key: ${{ secrets.SSH_KEY }} | |
- name: Run build | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
TEST_SUITE: ${{ matrix.test_suite }} | |
TESTENV: c | |
run: | | |
bash ./ci-build.sh | |
dependabot: | |
name: "Dependabot" | |
needs: [unix] | |
runs-on: ubuntu-latest | |
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot | |
steps: | |
- name: Enable auto-merge for Dependabot PRs | |
run: | | |
gh pr review --approve "$PR_URL" | |
gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |