Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

CI

CI #412

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
release:
types: [created]
push:
branches:
- main
schedule:
- cron: "20 23 * * 4"
jobs:
lint:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pull git submodules
run: |
git submodule init
git submodule update
- name: Install GDAL
run: |
sudo apt-get update
sudo apt-get install libgdal-dev
if: matrix.os == 'ubuntu-latest'
- name: Install latest stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy
- name: Lint with rustfmt
run: cargo fmt
- name: Lint with clippy
run: cargo clippy --all-targets --all-features
if: matrix.os == 'ubuntu-latest'
- name: Test with cargo
run: cargo test --workspace --all-features --all-targets
if: matrix.os == 'ubuntu-latest'
- name: Test with cargo
# no gdal available
run: cargo test --workspace --exclude "h3ron-ndarray"
if: matrix.os != 'ubuntu-latest'
#
# rust-publish:
# if: github.event_name == 'release' && github.event.action == 'created'
# needs: lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
#
# - name: Install latest stable
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: stable
# components: rustfmt, clippy
#
# - name: Pull git submodules
# run: |
# git submodule init
# git submodule update
#
# - name: Publish h3ron-h3-sys on crates.io
# working-directory: h3ron-h3-sys
# run: |
# cargo login ${{ secrets.CARGO }}
# cargo publish
# # wait a bit as the crates depend on each other and crates.io needs a few seconds
# # to synchronize after an upload
# sleep 10
#
# - name: Publish h3ron on crates.io
# working-directory: h3ron
# run: |
# cargo login ${{ secrets.CARGO }}
# cargo publish
# # wait a bit as the crates depend on each other and crates.io needs a few seconds
# # to synchronize after an upload
# sleep 10
#
# - name: Publish h3ron-ndarray on crates.io
# working-directory: h3ron-ndarray
# run: |
# cargo login ${{ secrets.CARGO }}
# cargo publish
# # wait a bit as the crates depend on each other and crates.io needs a few seconds
# # to synchronize after an upload
# sleep 10