Skip to content

Commit 21d5333

Browse files
authored
Merge branch 'main' into tensor-mesh-cell-bounds
2 parents e1c92b0 + 1ab5e9a commit 21d5333

75 files changed

Lines changed: 2655 additions & 2312 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/azure/deploy.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ jobs:
33
displayName: "Deploy Docs and source"
44
pool:
55
vmImage: ubuntu-latest
6+
67
steps:
78
# No need to checkout the repo here!
89
- checkout: none
910

11+
- bash: |
12+
echo $IS_TAG
13+
echo $IS_MAIN
14+
echo $BRANCH_NAME
15+
displayName: Report branch parameters
16+
1017
# Just download all of the items already built
1118
- task: DownloadPipelineArtifact@2
1219
inputs:
@@ -29,6 +36,7 @@ jobs:
2936
- bash: |
3037
ls -l dist
3138
ls -l html
39+
displayName: Report downloaded cache contents.
3240
3341
- bash: |
3442
git config --global user.name ${GH_NAME}
@@ -42,22 +50,39 @@ jobs:
4250
- bash: |
4351
twine upload --skip-existing dist/*
4452
displayName: Deploy source and wheels
53+
condition: eq(variables.IS_TAG, true)
4554
env:
4655
TWINE_USERNAME: $(twine.username)
4756
TWINE_PASSWORD: $(twine.password)
4857
4958
# upload documentation to discretize-docs gh-pages on tags
5059
- bash: |
51-
git clone --depth 1 https://${GH_TOKEN}@github.com/simpeg/discretize-docs.git
60+
git clone -q --branch gh-pages --depth 1 https://${GH_TOKEN}@github.com/simpeg/discretize-docs.git
61+
displayName: Checkout doc repository
62+
env:
63+
GH_TOKEN: $(gh.token)
64+
65+
- bash: |
5266
cd discretize-docs
53-
git gc --prune=now
54-
git remote prune origin
55-
rm -rf en/main/*
56-
cp -r html/* en/main/
67+
rm -rf "en/$BRANCH_NAME"
68+
mv ../html "en/$BRANCH_NAME"
5769
touch .nojekyll
58-
git add .
70+
displayName: Set Doc Folder
71+
72+
- bash: |
73+
# Update latest symlink
74+
cd discretize-docs
75+
rm -f en/latest
76+
ln -s "en/$BRANCH_NAME" en/latest
77+
displayName: Point Latest to tag
78+
condition: eq(variables.IS_TAG, true)
79+
80+
- bash: |
81+
# Commit and push
82+
cd discretize-docs
83+
git add --all
5984
git commit -am "Azure CI commit ref $(Build.SourceVersion)"
6085
git push
6186
displayName: Push documentation to discretize-docs
6287
env:
63-
GH_TOKEN: $(gh.token)
88+
GH_TOKEN: $(gh.token)

.ci/azure/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jobs:
2-
- job:
2+
- job: BuildDocs
33
displayName: "Build Documentation"
44
pool:
55
vmImage: ubuntu-latest
@@ -33,4 +33,4 @@ jobs:
3333
inputs:
3434
targetPath: 'docs/_build/html'
3535
artifact: 'html_docs'
36-
parallel: true
36+
parallel: true

.ci/azure/setup_env.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ do_doc=$(echo "${DOC_BUILD:-false}" | tr '[:upper:]' '[:lower:]')
77

88
if ${is_azure}
99
then
10-
conda update --yes -n base conda
1110
if ${do_doc}
1211
then
1312
.ci/setup_headless_display.sh

.ci/azure/setup_miniconda_macos.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -ex #echo on and exit if any line fails
3+
4+
echo "arch is $ARCH"
5+
if [[ $ARCH == "X64" ]]; then
6+
MINICONDA_ARCH_LABEL="x86_64"
7+
else
8+
MINICONDA_ARCH_LABEL="arm64"
9+
fi
10+
echo $MINICONDA_ARCH_LABEL
11+
mkdir -p ~/miniconda3
12+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-$MINICONDA_ARCH_LABEL.sh -o ~/miniconda3/miniconda.sh
13+
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
14+
rm ~/miniconda3/miniconda.sh
15+
echo "##vso[task.setvariable variable=CONDA;]${HOME}/miniconda3"

.ci/azure/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@ jobs:
3535
vmImage: $(image)
3636
variables:
3737
varOS: $(Agent.OS)
38+
ARCH: $(Agent.OSArchitecture)
3839
steps:
40+
- bash: .ci/azure/setup_miniconda_macos.sh
41+
displayName: Install miniconda on mac
42+
condition: eq(variables.varOS, 'Darwin')
43+
3944
- bash: echo "##vso[task.prependpath]$CONDA/bin"
4045
displayName: Add conda to PATH
4146
condition: ne(variables.varOS, 'Windows_NT')
4247

43-
- bash: sudo chown -R $USER $CONDA
44-
displayName: Take ownership of conda directory
45-
condition: eq(variables.varOS, 'Darwin')
46-
4748
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
4849
displayName: Add conda to PATH
4950
condition: eq(variables.varOS, 'Windows_NT')

.ci/environment_test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ channels:
44
dependencies:
55
- numpy>=1.22.4
66
- scipy>=1.8
7+
78
# optionals
89
- vtk>=6
910
- pyvista
1011
- omf
1112
- matplotlib
13+
1214
# documentation
1315
- sphinx
14-
- pydata-sphinx-theme==0.13.3
16+
- pydata-sphinx-theme==0.15.4
1517
- sphinx-gallery>=0.1.13
1618
- numpydoc>=1.5
1719
- jupyter
1820
- graphviz
19-
- pymatsolver>=0.1.2
2021
- pillow
2122
- pooch
23+
2224
# testing
2325
- sympy
2426
- pytest

azure-pipelines.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ pr:
1515
exclude:
1616
- '*no-ci*'
1717

18+
variables:
19+
BRANCH_NAME: $(Build.SourceBranchName)
20+
IS_TAG: $[startsWith(variables['Build.SourceBranch'], 'refs/tags/')]
21+
IS_MAIN: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
22+
1823
stages:
1924
- stage: StyleChecks
2025
displayName: "Style Checks"
@@ -52,7 +57,7 @@ stages:
5257
dependsOn:
5358
- BuildWheels
5459
- BuildSource
55-
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/'))
60+
condition: and(succeeded(), or(eq(variables.IS_TAG, true), eq(variables.IS_MAIN, true)))
5661
jobs:
5762
- template: .ci/azure/deploy.yml
5863

0 commit comments

Comments
 (0)