Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Justfile #4

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
source /opt/conda/etc/profile.d/conda.sh
conda activate prd
source <(yardl completion bash)
source <(just --completions bash)

if [[ "${BASH_ENV:-}" == "$(readlink -f "${BASH_SOURCE[0]:-}")" ]]; then
# We don't want subshells to unnecessarily source this again.
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"ms-python.python",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"sclu1034.justfile",
"timonwong.shellcheck",
"twxs.cmake"
]
Expand Down
4 changes: 4 additions & 0 deletions data/download-data.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash

set -euo pipefail

# Check if azcopy is installed
cd "$(dirname "$0")"

if ! command -v azcopy &> /dev/null
then
wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux
Expand Down
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ channels:
dependencies:
- bash-completion>=2.11
- cmake>=3.21.3
- fmt>=8.1.1
- compilers
- fmt>=8.1.1
- gh=2.38.0
- h5py>=3.7.0
- hdf5>=1.12.1
- howardhinnant_date>=3.0.1
- ipykernel>=6.19.2
- gh=2.38.0
- just=1.16.0
- ninja>=1.11.0
- nlohmann_json>=3.11.2
- numpy>=1.24.3
Expand Down
21 changes: 21 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
set shell := ['bash', '-ceuo', 'pipefail']

default: build

@download-test-data:
data/download-data.sh

@ensure-build-dir:
mkdir -p cpp/build

@generate:
cd PETSIRD/model; \
yardl generate

@configure: generate ensure-build-dir
cd cpp/build; \
cmake -GNinja ..

@build: configure
cd cpp/build; \
ninja