Support building Gemstone on x86_64 arch (#303) #492
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
name: Diesel | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
check_schema: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./ | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install just & diesel | |
run: | | |
cargo install just && just install-diesel | |
- name: Run migration | |
run: | | |
diesel setup | |
diesel migration run | |
env: | |
DATABASE_URL: "postgres://postgres:postgres@localhost/postgres" | |
- name: Check schema | |
run: | | |
git --no-pager diff | |
git diff --quiet --exit-code crates/storage/src/schema.rs |