Skip to content

Commit

Permalink
Initial CI Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
davisp committed Mar 19, 2024
1 parent fd7c40f commit ae4939c
Show file tree
Hide file tree
Showing 5 changed files with 1,348 additions and 30 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
workflow_call:
workflow_dispatch:

push:
branches:
- main
- refs/tags/*
pull_request:
branches:
- '*' # must quote since "*" is a YAML reserved character; we want a string

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

name: Stable Build and Test

# Make sure CI fails on all warnings, including Clippy lints
env:
RELEASES_URL: "https://github.com/TileDB-Inc/TileDB/releases/download"

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install TileDB
run: |
set -e pipefail
mkdir -p /opt/tiledb
cd /opt/tiledb
wget -q ${RELEASES_URL}/2.21.0-rc1/tiledb-linux-x86_64-2.21.0-rc1-0ea9c13.tar.gz
wget -q ${RELEASES_URL}/2.21.0-rc1/tiledb-linux-x86_64-2.21.0-rc1-0ea9c13.tar.gz.sha256
sha256sum tiledb*.sha256
tar -C /opt/tiledb -xzf tiledb*.tar.gz
- name: Lint
run: cargo clippy --all-targets --all-features
- name: Build
run: cargo build --all-targets --all-features
- name: Test
run: cargo test --all-targets --all-features
29 changes: 0 additions & 29 deletions .github/workflows/clippy-check.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/nigthtly-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
schedule:
# runs every day at 1:45 UTC
- cron: "45 01 * * *"
workflow_dispatch:

name: Stable Build and Test Nightly

jobs:
update_build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install TileDB
run: |
set -e pipefail
mkdir -p /opt/tiledb
cd /opt/tiledb
wget -q ${RELEASES_URL}/2.21.0-rc1/tiledb-linux-x86_64-2.21.0-rc1-0ea9c13.tar.gz
wget -q ${RELEASES_URL}/2.21.0-rc1/tiledb-linux-x86_64-2.21.0-rc1-0ea9c13.tar.gz.sha256
sha256sum tiledb*.sha256
tar -C /opt/tiledb -xzf tiledb*.tar.gz
- name: Update Dependencies
run: cargo update --recursive
- name: Lint
run: cargo clippy --all-targets --all-features
- name: Build
run: cargo build --all-targets --all-features
- name: Test
run: cargo test --all-targets --all-features

create_issue_on_fail:
permissions:
issues: write
runs-on: ubuntu-latest
needs: update_build_and_test
if: failure() || cancelled()
steps:
- uses: actions/checkout@v3
- name: Create Issue on Failure
uses: TileDB-Inc/github-actions/open-issue@main
with:
name: Nightly Build Failure
label: nightly-failure
assignee: davisp,rroelke
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
**/.DS_Store

.nova
Cargo.lock
target
test.config

Expand Down
Loading

0 comments on commit ae4939c

Please sign in to comment.