From bb028b565c7e7501dc7cedbd8d6428d41c6e7164 Mon Sep 17 00:00:00 2001 From: Michael Persico Date: Tue, 14 Jan 2025 00:45:51 +0000 Subject: [PATCH 1/3] basic devcontainer config --- .devcontainer/devcontainer.json | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c21ddb3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,56 @@ +{ + "name": "LocalStack DinD setup", + "image": "mcr.microsoft.com/devcontainers/base:jammy", + + "remoteEnv": { + // Activate LocalStack Pro: https://docs.localstack.cloud/getting-started/auth-token/ + "LOCALSTACK_AUTH_TOKEN": "${localEnv:LOCALSTACK_AUTH_TOKEN}", // required for Pro, not processed via template due to security reasons + "LOCALSTACK_API_KEY": "${localEnv:LOCALSTACK_API_KEY}", + // LocalStack configuration: https://docs.localstack.cloud/references/configuration/ + "ACTIVATE_PRO": false, + "DEBUG": true, + "LS_LOG": "debug", + "PERSISTENCE": false, + "AWS_ENDPOINT_URL": "http://localhost.localstack.cloud:4566", + "AUTO_LOAD_POD": " ", + "ENFORCE_IAM": false, + "AWS_REGION": "us-east-1", + "AWS_DEFAULT_REGION": "us-east-1", + "IMAGE_NAME": "localstack/localstack-pro:latest", + "LOCALSTACK_VOLUME_DIR": "/data" + }, + + // 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features. + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + "ghcr.io/localstack/devcontainer-feature/localstack-cli:latest": { + "version": "latest", + "awslocal": true, // if true, add in features manually: ghcr.io/devcontainers/features/aws-cli + "cdklocal": false, // if true, add in features manually: ghcr.io/devcontainers-contrib/features/aws-cdk + "pulumilocal": false, // if true, add in features manually: ghcr.io/devcontainers-contrib/features/pulumi + "samlocal": false, // if true, add in features manually: ghcr.io/customink/codespaces-features/sam-cli + "tflocal": false // if true, add in features manually: ghcr.io/devcontainers-contrib/features/terraform-asdf + }, + "ghcr.io/devcontainers/features/aws-cli:1": {}, + "ghcr.io/julialang/devcontainer-features/julia:1": { + "channel": "lts" + } + }, + + // 👇 Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "type localstack; true && localstack start -d || true", + "mounts": [ + { + // to persist build data and images + "source": "dind-var-lib-docker", + "target": "/var/lib/docker", + "type": "volume" + }, + { + "source": "./.volume", + "target": "/data", + "type": "bind", + "consistency": "cached" + } + ] +} From 9f747cd5c3afb4ca071c4ce60640de96318941c2 Mon Sep 17 00:00:00 2001 From: Michael Persico Date: Mon, 20 Jan 2025 16:46:00 +0000 Subject: [PATCH 2/3] switch to julia v1.6 --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c21ddb3..e885bbe 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -33,7 +33,7 @@ }, "ghcr.io/devcontainers/features/aws-cli:1": {}, "ghcr.io/julialang/devcontainer-features/julia:1": { - "channel": "lts" + "channel": "1.6" } }, From 60d944a3d834c2545e28882d9293bcafa0983d7d Mon Sep 17 00:00:00 2001 From: Michael Persico Date: Mon, 20 Jan 2025 20:59:06 +0000 Subject: [PATCH 3/3] add lts channel --- .devcontainer/devcontainer.json | 56 --------------------------------- .github/workflows/CI.yml | 3 +- README.md | 2 ++ src/VersionsJSONUtil.jl | 11 +++++++ 4 files changed, 15 insertions(+), 57 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index e885bbe..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "LocalStack DinD setup", - "image": "mcr.microsoft.com/devcontainers/base:jammy", - - "remoteEnv": { - // Activate LocalStack Pro: https://docs.localstack.cloud/getting-started/auth-token/ - "LOCALSTACK_AUTH_TOKEN": "${localEnv:LOCALSTACK_AUTH_TOKEN}", // required for Pro, not processed via template due to security reasons - "LOCALSTACK_API_KEY": "${localEnv:LOCALSTACK_API_KEY}", - // LocalStack configuration: https://docs.localstack.cloud/references/configuration/ - "ACTIVATE_PRO": false, - "DEBUG": true, - "LS_LOG": "debug", - "PERSISTENCE": false, - "AWS_ENDPOINT_URL": "http://localhost.localstack.cloud:4566", - "AUTO_LOAD_POD": " ", - "ENFORCE_IAM": false, - "AWS_REGION": "us-east-1", - "AWS_DEFAULT_REGION": "us-east-1", - "IMAGE_NAME": "localstack/localstack-pro:latest", - "LOCALSTACK_VOLUME_DIR": "/data" - }, - - // 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features. - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {}, - "ghcr.io/localstack/devcontainer-feature/localstack-cli:latest": { - "version": "latest", - "awslocal": true, // if true, add in features manually: ghcr.io/devcontainers/features/aws-cli - "cdklocal": false, // if true, add in features manually: ghcr.io/devcontainers-contrib/features/aws-cdk - "pulumilocal": false, // if true, add in features manually: ghcr.io/devcontainers-contrib/features/pulumi - "samlocal": false, // if true, add in features manually: ghcr.io/customink/codespaces-features/sam-cli - "tflocal": false // if true, add in features manually: ghcr.io/devcontainers-contrib/features/terraform-asdf - }, - "ghcr.io/devcontainers/features/aws-cli:1": {}, - "ghcr.io/julialang/devcontainer-features/julia:1": { - "channel": "1.6" - } - }, - - // 👇 Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "type localstack; true && localstack start -d || true", - "mounts": [ - { - // to persist build data and images - "source": "dind-var-lib-docker", - "target": "/var/lib/docker", - "type": "volume" - }, - { - "source": "./.volume", - "target": "/data", - "type": "bind", - "consistency": "cached" - } - ] -} diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 76f260a..ff2d7fe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,8 @@ permissions: env: aws_region: us-east-1 s3_bucket: julialang2 - + JULIA_LTS: 1.10 + jobs: package-tests: name: Package tests diff --git a/README.md b/README.md index 1c65cbc..b237152 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ More info: https://github.com/JuliaLang/julia/issues/33817 To trigger a rebuild of the `versions.json` file and to upload it to S3, you need to manually trigger the `CI` workflow in this repo. You can either trigger it through the GitHub UI or via an authenticated HTTP request. +The current Julia LTS release is set via the `JULIA_LTS` variable in the [CI workflow](.github/workflows/CI.yml). + ### GitHub's UI ![grafik](https://user-images.githubusercontent.com/20866761/127783220-fd8167db-5051-4a18-b70a-ea42085a7cb5.png) diff --git a/src/VersionsJSONUtil.jl b/src/VersionsJSONUtil.jl index 837d348..191b7ae 100644 --- a/src/VersionsJSONUtil.jl +++ b/src/VersionsJSONUtil.jl @@ -122,6 +122,11 @@ function is_stable(v::VersionNumber) return v.prerelease == () && v.build == () end +function is_lts(v::VersionNumber) + lts = VersionNumber(ENV["JULIA_LTS"]) + return lts.major === v.major && lts.minor === v.minor && isempty(v.prerelease) +end + # Get list of tags from the Julia repo function get_tags() @info("Probing for tag list...") @@ -240,6 +245,12 @@ function main(out_path) rm(filepath) end end + @info("Adding lts entry...") + lts_version = maximum(filter(is_lts, keys(meta))) + push!(meta, "lts" => meta[lts_version]) + open(out_path, "w") do io + JSON.print(io, meta, 2) + end @info "Tried $(number_urls_tried) versions, successfully downloaded $(number_urls_success)" end