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

Merge beta branch into main #119

Merged
merged 97 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
ca0553c
feat: setup semantic release
plexoos Apr 23, 2024
51d0ebc
chore(release): 1.0.0-beta.1
semantic-release-bot Apr 26, 2024
3a12c6b
ci: update pull request workflow (#35)
plexoos Apr 26, 2024
1906009
ci: update pull request workflow (#36)
plexoos Apr 26, 2024
928acba
fix(eic-shell): switch to ghcr.io registry
plexoos Apr 26, 2024
105a4ba
fix: remove container after tests
plexoos Apr 26, 2024
941ab00
chore(release): 1.0.0-beta.2
semantic-release-bot Apr 26, 2024
2d6706a
feat: upgrade opticks (#39)
plexoos May 3, 2024
e7e3351
chore(release): 1.0.0-beta.3
semantic-release-bot May 3, 2024
13c5502
chore: rename repo to esi-shell (#44)
plexoos May 3, 2024
8138919
revert: restore removed pull of latest image for cache purposes (#47)
plexoos May 3, 2024
dcbdd92
chore: re-license with Apache License Version 2.0 (#46)
plexoos May 3, 2024
4338f7c
feat: update opticks (#42)
plexoos May 6, 2024
f8824f3
chore(release): 1.0.0-beta.4
semantic-release-bot May 6, 2024
3d2f837
feat: build gpu code dependent on OptiX, run opticks tests (#49)
plexoos May 7, 2024
c67557d
fix: pull external asset in release workflow (#51)
plexoos May 7, 2024
a566835
Revert "fix: pull external asset in release workflow (#51)"
plexoos May 7, 2024
a301bd2
Revert "feat: build gpu code dependent on OptiX, run opticks tests (#…
plexoos May 7, 2024
e45db58
chore(release): 1.0.0-beta.5
semantic-release-bot May 7, 2024
5f58b7b
feat: build gpu code dependent on OptiX, run opticks tests (#49) (#53)
plexoos May 7, 2024
91618f5
chore(release): 1.0.0-beta.6
semantic-release-bot May 7, 2024
55968d3
ci: combine build and test jobs in build-pull-request workflow (#54)
plexoos May 7, 2024
71e70c8
ci: use proper token to cleanup untagged packages
plexoos May 7, 2024
20c6f4b
test: add wrapper around opticks tests (#57)
plexoos May 8, 2024
752302c
Update readme instructions for running with docker (#56)
rahmans1 May 9, 2024
7a0e1f9
Add vim text editor to the container (#60)
rahmans1 May 9, 2024
e483587
ci: use appropriate token (#61)
plexoos May 10, 2024
33f5b06
fix: always pull updated image from registry (#62)
plexoos May 10, 2024
9d1789a
chore(release): 1.0.0-beta.7
semantic-release-bot May 10, 2024
79b26c8
ci: fix unknown manifest issue (#64)
plexoos May 10, 2024
69d16ac
ci: clean up PR image tags (#65)
plexoos May 10, 2024
044e0ba
fix(env): load xerces-c, update PATH (#66)
plexoos May 13, 2024
c6dc0da
chore(release): 1.0.0-beta.8
semantic-release-bot May 13, 2024
6b4ea3f
fix(shell): enable optix with driver capabilities (#69)
plexoos May 14, 2024
dd598e4
chore(release): 1.0.0-beta.9
semantic-release-bot May 14, 2024
a3761be
fix(env): keep g4emlow
plexoos May 14, 2024
826cf5b
set compute capability to 89
plexoos May 14, 2024
a35a8d6
chore(release): 1.0.0-beta.10
semantic-release-bot May 14, 2024
fc6924f
ci: set up build using local cache (#74)
plexoos May 16, 2024
b54da0c
chore: run non-interactive commands in login shell (#75)
plexoos May 16, 2024
1bf8b2e
fix: use default HOME and PWD inside container (#80)
plexoos May 29, 2024
a74bdfd
chore: patch opticks for incorrect numpy dtype (#81)
plexoos May 29, 2024
3e079dd
chore: use poetry for python dependencies (#72)
plexoos May 31, 2024
53ba5cb
chore: update opticks to master@393f976c8 (#78)
plexoos May 31, 2024
5a0f897
fix: use single command to execute container commands
plexoos May 29, 2024
1217f36
feat(esi-shell): exec user command, pass through container options
plexoos May 10, 2024
5993226
ci: run test command in esi-shell
plexoos May 31, 2024
5413d8b
fix(env): activate virtual environment via poetry
plexoos May 31, 2024
71d09ae
fix(esi-shell): run commands without TTY
plexoos May 31, 2024
ad3d843
chore(release): 1.0.0-beta.11
semantic-release-bot May 31, 2024
e009ef9
fix(esi-shell): avoid passing options to echo
plexoos Jun 3, 2024
5ecbca3
chore(release): 1.0.0-beta.12
semantic-release-bot Jun 3, 2024
06780ab
fix(env): define environment variable TMP expected by opticks tests (…
plexoos Jun 7, 2024
a8a3b9d
chore(release): 1.0.0-beta.13
semantic-release-bot Jun 7, 2024
8ae74b3
docs: update README (#77)
plexoos Jun 18, 2024
e264829
fix: install cmake directly (#88)
plexoos Jun 19, 2024
893c757
chore(release): 1.0.0-beta.14
semantic-release-bot Jun 19, 2024
6a4a045
fix(build): compile for generic x86_64 (v3) microarchitecture (#90)
plexoos Jun 20, 2024
ecb3f11
chore(release): 1.0.0-beta.15
semantic-release-bot Jun 20, 2024
5086c63
chore: change submodule repository (#91)
plexoos Jun 20, 2024
5fd400c
build: add pyplot to virtual environment (#92)
plexoos Jun 24, 2024
a1e8d0c
build: compile GPU code for a low virtual architecture (#97)
plexoos Jun 27, 2024
70178bb
change default geometry to Opticks built-in
plexoos Jun 24, 2024
ac3629b
docs: update README with how to run a basic Opticks test
plexoos Jun 24, 2024
721aff4
ci(release): update esi-shell version before deploying it (#98)
plexoos Jul 10, 2024
70623b9
fix: rename esi-shell option --version to --tag (#99)
plexoos Jul 10, 2024
1ea208e
chore(release): 1.0.0-beta.16
semantic-release-bot Jul 10, 2024
9c15c86
fix: add option to print esi-shell version (#100)
plexoos Jul 12, 2024
464f393
chore(release): 1.0.0-beta.17
semantic-release-bot Jul 12, 2024
7d6ba53
chore: get rid of unnecessary npm package.json (#101)
plexoos Jul 12, 2024
3277f6f
fix: update opticks (#102)
plexoos Jul 12, 2024
50ff856
chore(release): 1.0.0-beta.18
semantic-release-bot Jul 12, 2024
73bbf95
rename pfrich.xml file as in eic/epic repo
plexoos Jul 19, 2024
417c947
sync pfrich.xml with eic/[email protected]
plexoos Jul 19, 2024
34861bb
fix(esi-shell): correct example command (#105)
plexoos Jul 24, 2024
ffd5bd5
chore(release): 1.0.0-beta.19
semantic-release-bot Jul 24, 2024
893f139
fix: update release version in pyproject.toml
plexoos Jul 24, 2024
7a79b8f
chore(release): 1.0.0-beta.20
semantic-release-bot Jul 25, 2024
cc6f775
fix(esi-shell): source profile scripts in non-login non-interactive s…
plexoos Jul 26, 2024
4e72453
chore(release): 1.0.0-beta.21
semantic-release-bot Jul 26, 2024
43748e1
feat: install opticks dependencies directly or via Spack
plexoos Aug 1, 2024
d4dc9d4
switch opticks submodule to updated fork
plexoos Aug 1, 2024
1e5f7cc
compile opticks packages individually
plexoos Aug 1, 2024
07eea78
test: run ctest for installed opticks packages
plexoos Aug 1, 2024
a8353e3
build: push pull request images to ghcr.io
plexoos May 23, 2024
3a4a531
fix(env): help CMake find installed opticks
plexoos Aug 2, 2024
9ffe563
chore(release): 1.0.0-beta.22
semantic-release-bot Aug 2, 2024
1d52510
fix: allow to bind dirs on remote host (#111)
plexoos Aug 2, 2024
34cf9ac
chore(release): 1.0.0-beta.23
semantic-release-bot Aug 2, 2024
9c43430
Revert "build: push pull request images to ghcr.io"
plexoos Aug 2, 2024
6f26574
chore(release): 1.0.0-beta.24
semantic-release-bot Aug 2, 2024
705ce92
chore: update opticks to currently latest revision (#115)
plexoos Aug 21, 2024
f15579d
fix: make virtual env available to all users (#114)
plexoos Aug 23, 2024
4abf023
docs: update README (#112)
plexoos Aug 23, 2024
092e498
chore(release): 1.0.0-beta.25
semantic-release-bot Aug 23, 2024
7fafef4
build: set permissions to rebuild Opticks (#116)
plexoos Aug 23, 2024
fa62c29
Merge remote-tracking branch 'origin/main' into beta
plexoos Sep 27, 2024
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
61 changes: 33 additions & 28 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,50 @@ concurrency:
cancel-in-progress: true

jobs:
build-container:
runs-on: ubuntu-latest
build-test:
runs-on: [gpu]
steps:
- name: Define environment variables
run: |
echo REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true

- name: Copy external assets
run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .

- name: Set up docker
uses: docker/setup-buildx-action@v3

- name: Build container
- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
tags: ghcr.io/${{ env.REPOSITORY }}:${{ env.TAG }}
outputs: type=docker,dest=/tmp/esi-opticks-${{ env.TAG }}.tar

- name: Save built image for test jobs
uses: actions/upload-artifact@v4
with:
name: esi-opticks-${{ env.TAG }}
path: /tmp/esi-opticks-${{ env.TAG }}.tar

test-container:
runs-on: ubuntu-latest
needs: build-container
steps:
- name: Define environment variables
context: .
tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }}
load: true
cache-from: |
type=local,src=/home/runner/.buildx-cache
type=registry,ref=${{ env.IMAGE_NAME }}:latest
cache-to: |
type=inline
type=local,dest=/home/runner/.buildx-cache-new,mode=max

- name: Move cache
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
run: |
echo REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV
rm -rf /home/runner/.buildx-cache
mv /home/runner/.buildx-cache-new /home/runner/.buildx-cache

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: esi-opticks-${{ env.TAG }}
path: /tmp
- name: Test image
run: |
docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} tests/test_opticks.sh

- name: Run tests
- name: Test esi-shell
run: |
docker load --input /tmp/esi-opticks-${{ env.TAG }}.tar
docker run ghcr.io/${{ env.REPOSITORY }}:${{ env.TAG }} bash -l -c opticks-info
./esi-shell -t ${{ env.TAG }} "opticks-full-prepare && opticks-t"
25 changes: 25 additions & 0 deletions .github/workflows/delete_untagged.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python3

import argparse
import json
import requests
import types

parser = argparse.ArgumentParser()
parser.add_argument("token", help="GitHub token")
args = parser.parse_args()

domain = "api.github.com"
org = "BNLNPPS"
package_type = "container"
package_name = "esi-shell"

api_url = f"https://{domain}/orgs/{org}/packages/{package_type}/{package_name}/versions"

respjson = requests.get(api_url, auth=("token", args.token))
entries = json.loads(respjson.text, object_hook=lambda d: types.SimpleNamespace(**d))

for e in entries:
if not e.metadata.container.tags:
response = requests.delete(api_url + f"/{e.id}", auth=("token", args.token))
print("delete", e.id, e.html_url, e.name, response.url, response.status_code)
135 changes: 135 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Release

on:
push:
branches:
- main
- beta
- betatest

jobs:
build-test-release:
runs-on: [gpu]
steps:
- name: Define environment variables
run: echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Important for Semantic Release to analyze all commits

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"

- run: npm install semantic-release-replace-plugin -D

- name: Copy external assets
run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .

- name: Set up docker buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image locally
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ env.IMAGE_NAME }}:latest
pull: true
load: true
cache-from: ${{ env.IMAGE_NAME }}:latest
cache-to: type=inline

- name: Test esi-shell
run: ./esi-shell "opticks-full-prepare && opticks-t"

- name: Declare latest and push
run: docker push ${{ env.IMAGE_NAME }}:latest

- name: Create semantic release
uses: cycjimmy/semantic-release-action@v4
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout new release
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/checkout@v4
with:
ref: ${{ steps.semantic.outputs.new_release_git_tag }}

- name: Copy external assets
run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .

- name: Build image for new release
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v5
with:
context: .
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ steps.semantic.outputs.new_release_version }}
push: true
provenance: false
cache-from: ${{ env.IMAGE_NAME }}:latest
cache-to: type=inline

deploy:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-test-release
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Update esi-shell version
run: |
sed -i "/^ESI_SHELL_VERSION=/ s/$/-$(git rev-parse --short HEAD)/" esi-shell

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

cleanup:
runs-on: ubuntu-latest
needs: build-test-release
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Delete untagged images
run: |
python -m pip install requests
.github/workflows/delete_untagged.py ${{ secrets.BNLNPPS_ESI_SHELL_PACKAGES_TOKEN }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "opticks"]
path = opticks
url = https://github.com/simoncblyth/opticks.git
url = https://github.com/bnlnpps/esi-opticks.git
2 changes: 1 addition & 1 deletion .opticks/GEOM/GEOM.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# THIS SCRIPT DOES ONE THING ONLY : IT EXPORTS GEOM
geom=pfRICH
geom=RaindropRockAirWater
export GEOM=$geom
29 changes: 29 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# See https://semantic-release.gitbook.io/semantic-release/usage/configuration
branches:
- '+([0-9])?(.{+([0-9]),x}).x'
- 'main'
- name: 'beta'
prerelease: true
- name: 'betatest'
prerelease: true
tagFormat: '${version}' # without this, the tag is prefixed with a 'v'
plugins:
- "@semantic-release/commit-analyzer"
- path: "semantic-release-replace-plugin"
replacements:
- files:
- esi-shell
from: ESI_SHELL_VERSION=.*
to: ESI_SHELL_VERSION=${nextRelease.version}
- files:
- pyproject.toml
from: version = ".*"
to: version = "${nextRelease.version}"
- "@semantic-release/release-notes-generator"
- "@semantic-release/changelog"
- path: "@semantic-release/git"
assets:
- "CHANGELOG.md"
- "esi-shell"
- "pyproject.toml"
message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
Loading
Loading