Skip to content

refactor: Justfile changes #78

refactor: Justfile changes

refactor: Justfile changes #78

Workflow file for this run

name: Build pg_idkit
on: [push]
jobs:
## Build the project
build:
runs-on: ubuntu-latest
strategy:
matrix:
# The version(s) of the Rust being used in the CI container
# (requires building and pushing via `just build-ci-image push-ci-image`)
rust_container_version:
- 1.73
container:
image: "ghcr.io/vadosware/pg_idkit/builder:0.x.x"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_BUILDER_IMAGE_PULL_PAT }}
env:
CARGO_HOME: /usr/local/cargo
CARGO_TARGET_DIR: /usr/local/build/target
SCCACHE_DIR: /usr/local/sccache
CARGO_BUILD_RUSTC_WRAPPER: /usr/local/cargo/bin/sccache
steps:
# Checkout the repo
- uses: actions/checkout@v3
##############
# Code Tests #
##############
- name: Add idkit to group
run: |
chgrp -R idkit $HOME &&
chgrp -R idkit /__w/pg_idkit &&
chmod g+w -R /__w/pg_idkit
# Run cargo build
- name: Run cargo test
run: |
su idkit -c "cargo build"
# Run cargo check
- name: Run cargo check
run: |
su idkit -c "cargo check"
# Run cargo test
- name: Run cargo test
run: |
su idkit -c "cargo test"
####################
# Post-run Caching #
####################
- name: Cache CARGO_HOME
uses: actions/cache@v2
continue-on-error: false
with:
path: |
/usr/local/cargo
key: pg_idkit-tests-rust-${{ matrix.rust_container_version }}-cargo-${{ runner.os }}
- name: Cache apt install
uses: actions/cache@v2
continue-on-error: false
with:
path: |
/var/cache/apt
key: pg_idkit-tests-apt-cache-${{ matrix.rust_container_version }}-cargo-${{ runner.os }}
- name: Cache sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: |
/usr/local/sccache
key: pg_idkit-tests-sccache-${{ matrix.rust_container_version }}-cargo-${{ runner.os }}