-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
153 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# Julia Tests | ||
|
||
name: Correctness - Julia | ||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: 1 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
file: lcov.info | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: payloads | ||
path: test/logs/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
# Automatically build Docker images on changes to main and push them to a | ||
# Container Registry using HCL Bake file. | ||
|
||
name: Build Docker Images | ||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ['main'] | ||
tags: ['*'] | ||
|
||
jobs: | ||
# Call the Lint & Format workflow before publishing | ||
verify: | ||
uses: ./.github/workflows/lint.yaml | ||
|
||
# Generate a more robust tag for the image | ||
tag-generator: | ||
name: Determine image tag | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
image-tag: ${{ steps.generate.outputs.tag }} | ||
steps: | ||
- name: Generate appropriate tag | ||
id: generate | ||
run: | | ||
if [[ '${{ github.ref_type }}' == 'branch' && '${{ github.ref_name }}' == 'main' ]]; then | ||
TAG=latest | ||
else | ||
SEMVER=$( echo ${{ github.ref_name }} | sed -nre 's/^v[^0-9]*(([0-9]+\.)*[0-9]+(-[a-z]+)?).*/\1/p') | ||
if [[ -n $SEMVER ]]; then | ||
TAG=${SEMVER} | ||
else | ||
TAG=${{ github.ref_name }} | ||
fi | ||
fi | ||
echo "$TAG" | ||
echo "tag=${TAG,,}" >> ${GITHUB_OUTPUT} | ||
- name: Show Generated Tag | ||
run: echo ${{ steps.generate.outputs.tag }} | ||
|
||
# Build and Publish all targets associated with specified group | ||
bake: | ||
needs: | ||
- verify | ||
- tag-generator | ||
uses: darpa-askem/.github/.github/workflows/bake-publish.yml@main | ||
with: | ||
file: 'docker/docker-bake.hcl' | ||
group: 'prod' | ||
registry: 'ghcr.io' | ||
organization: ${{ github.repository_owner }} | ||
tag: ${{ needs.tag-generator.outputs.image-tag }} | ||
secrets: | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
variable "DOCKER_REGISTRY" { | ||
default = "ghcr.io" | ||
} | ||
variable "DOCKER_ORG" { | ||
default = "darpa-askem" | ||
} | ||
variable "VERSION" { | ||
default = "local" | ||
} | ||
|
||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
function "tag" { | ||
params = [image_name, prefix, suffix] | ||
result = [ "${DOCKER_REGISTRY}/${DOCKER_ORG}/${image_name}:${check_prefix(prefix)}${VERSION}${check_suffix(suffix)}" ] | ||
} | ||
|
||
function "check_prefix" { | ||
params = [tag] | ||
result = notequal("",tag) ? "${tag}-": "" | ||
} | ||
|
||
function "check_suffix" { | ||
params = [tag] | ||
result = notequal("",tag) ? "-${tag}": "" | ||
} | ||
|
||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
group "prod" { | ||
targets = ["simulation-scheduler"] | ||
} | ||
|
||
group "default" { | ||
targets = ["simulation-scheduler-base"] | ||
} | ||
|
||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
# Removed linux/arm64 for now to ass CI build - Dec 2022 | ||
target "_platforms" { | ||
platforms = ["linux/amd64"] | ||
} | ||
|
||
target "simulation-service-base" { | ||
context = ".." | ||
tags = tag("simulation-scheduler", "", "") | ||
dockerfile = "Dockerfile.api" | ||
} | ||
|
||
target "simulation-service" { | ||
inherits = ["_platforms", "simulation-service-base"] | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Test: @test | ||
|
||
# TODO(five): Add actual tests for SciML operations | ||
@test 1 == 1 | ||
|
||
# TODO(five): Add actual tests for scheduler API | ||
@test 2 == 2 |
Empty file.