diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 0628cc51..00000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -ARG VARIANT="bullseye" -FROM --platform=linux/amd64 buildpack-deps:${VARIANT}-curl diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dffd45e5..33556279 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,43 +1,7 @@ { "name": "eggla", - "build": { - "dockerfile": "Dockerfile", - "args": { - "VARIANT": "bullseye" - } - }, + "image": "buildpack-deps:bullseye-curl", "remoteUser": "vscode", - "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "installZsh": "true", - "username": "vscode", - "userUid": "1001", - "userGid": "1001", - "upgradePackages": "true" - }, - "ghcr.io/devcontainers/features/git:1": { - "version": "latest", - "ppa": "false" - }, - "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { - "version": "4.2.0", - "vscodeRSupport": "full", - "installDevTools": "false", - "installREnv": "true", - "installRMarkdown": "false" - }, - "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": { - "version": "prerelease", - "installTinyTex": "false", - "installChromium": "false" - }, - "./bcftools": { - "version": "1.16" - }, - "./eggla": { - "version": "main" - } - }, "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/bcftools/devcontainer-feature.json b/.github/.devcontainer/bcftools/devcontainer-feature.json similarity index 100% rename from .devcontainer/bcftools/devcontainer-feature.json rename to .github/.devcontainer/bcftools/devcontainer-feature.json diff --git a/.devcontainer/bcftools/install.sh b/.github/.devcontainer/bcftools/install.sh similarity index 100% rename from .devcontainer/bcftools/install.sh rename to .github/.devcontainer/bcftools/install.sh diff --git a/.github/.devcontainer/devcontainer.json b/.github/.devcontainer/devcontainer.json new file mode 100644 index 00000000..091f57fa --- /dev/null +++ b/.github/.devcontainer/devcontainer.json @@ -0,0 +1,48 @@ +{ + "name": "eggla", + "image": "ghcr.io/mcanouil/eggla:devel", + "remoteUser": "vscode", + "remoteEnv": { + "PKG_SYSREQS": "true" + }, + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": "true", + "username": "vscode", + "userUid": "1001", + "userGid": "1001", + "upgradePackages": "true" + }, + "ghcr.io/devcontainers/features/git:1": { + "version": "latest", + "ppa": "false" + }, + "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { + "version": "4.2.0", + "vscodeRSupport": "full", + "installDevTools": "false", + "installREnv": "true", + "installRMarkdown": "false" + }, + "./bcftools": { + "version": "1.16" + }, + "./eggla": { + "version": "main" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "REditorSupport.r" + ], + "settings": { + "r.rterm.option": [ + "--no-save", + "--no-restore-data", + "--quiet" + ] + } + } + } +} diff --git a/.devcontainer/eggla/R/lock.R b/.github/.devcontainer/eggla/R/lock.R similarity index 100% rename from .devcontainer/eggla/R/lock.R rename to .github/.devcontainer/eggla/R/lock.R diff --git a/.devcontainer/eggla/R/pkg.lock b/.github/.devcontainer/eggla/R/pkg.lock similarity index 100% rename from .devcontainer/eggla/R/pkg.lock rename to .github/.devcontainer/eggla/R/pkg.lock diff --git a/.devcontainer/eggla/bin/plink2 b/.github/.devcontainer/eggla/bin/plink2 similarity index 100% rename from .devcontainer/eggla/bin/plink2 rename to .github/.devcontainer/eggla/bin/plink2 diff --git a/.devcontainer/eggla/devcontainer-feature.json b/.github/.devcontainer/eggla/devcontainer-feature.json similarity index 100% rename from .devcontainer/eggla/devcontainer-feature.json rename to .github/.devcontainer/eggla/devcontainer-feature.json diff --git a/.devcontainer/eggla/install.sh b/.github/.devcontainer/eggla/install.sh similarity index 93% rename from .devcontainer/eggla/install.sh rename to .github/.devcontainer/eggla/install.sh index 0a8ef8df..66c22d22 100644 --- a/.devcontainer/eggla/install.sh +++ b/.github/.devcontainer/eggla/install.sh @@ -77,7 +77,8 @@ check_packages curl \ libfribidi-dev \ libv8-dev \ libudunits2-dev \ - libfftw3-dev + libfftw3-dev \ + libgit2-dev install_pak() { local version=$1 @@ -102,9 +103,11 @@ echo "Install R packages..." mkdir /tmp/r-packages pushd /tmp/r-packages + install_pak "auto" -su "${USERNAME}" -c "R -q -e \"pak::lockfile_install(update = TRUE)\"" +cp ${FEATURE_DIR}/R/pkg.lock pkg.lock +su "${USERNAME}" -c "R -q -e \"n <- 0; while(inherits(try(pak::lockfile_install(update = TRUE), silent = TRUE), 'try-error') && n < 3) n <- n + 1\"" if [ "${EGGLA_VERSION}" = "main" ]; then su "${USERNAME}" -c "R -q -e \"pak::pkg_install('mcanouil/eggla', upgrade = FALSE, dependencies = TRUE)\"" diff --git a/.devcontainer/eggla/tests/eggla-example.R b/.github/.devcontainer/eggla/tests/eggla-example.R similarity index 100% rename from .devcontainer/eggla/tests/eggla-example.R rename to .github/.devcontainer/eggla/tests/eggla-example.R diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index aa0f46bb..057efe64 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -14,7 +14,7 @@ concurrency: cancel-in-progress: true jobs: - build-docker: + build-devcontainer: runs-on: ubuntu-latest if: | github.event_name == 'workflow_dispatch' ||