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

BREAKING: repository structure change #782

Merged
merged 59 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
168960f
build: set devcontainer.json [skip ci]
eitsupi Apr 21, 2024
263e090
build: add variable table generate script and tables [skip ci]
eitsupi Apr 21, 2024
2cea2eb
build: add build args generate script and args json files [skip ci]
eitsupi Apr 21, 2024
d2e311b
build: add Dockerfile generate script and Dockerfile templates [skip ci]
eitsupi Apr 21, 2024
70c0ffc
build: generate Dockerfiles [skip ci]
eitsupi Apr 21, 2024
220f9f1
build: add docker-bake.json generate script and docker-bake.json temp…
eitsupi Apr 21, 2024
315913b
build: generate docker-bake.json files [skip ci]
eitsupi Apr 21, 2024
cb2c4f8
chore: auto formatting [skip ci]
eitsupi Apr 21, 2024
bf21b61
build: update files for devel images [skip ci]
eitsupi Apr 21, 2024
a2eb4db
docs: update about bakefiles generation [skip ci]
eitsupi Apr 21, 2024
72c1e95
chore: update R version limit logic [skip ci]
eitsupi Apr 22, 2024
d082d97
docs: update notes about scripts [skip ci]
eitsupi Apr 22, 2024
7f011ba
build: add templates for cuda, ml, ml-verse, and update the dockerfil…
eitsupi Apr 22, 2024
a78224d
build: regen Dockerfiles [skip ci]
eitsupi Apr 22, 2024
fa155ed
chore: add todo comment [skip ci]
eitsupi Apr 22, 2024
35f5004
build: add templates for cuda docker-bake.json and update the bakefil…
eitsupi Apr 22, 2024
eb08179
build: regen bakefiles [skip ci]
eitsupi Apr 22, 2024
4a0543b
build: add matrix for binder and cuda (latest 2 versions only) [skip ci]
eitsupi Apr 22, 2024
f3a47ba
build: add templates for binder Dockerfile and update the Dockerfile …
eitsupi Apr 22, 2024
c41b353
build: regen Dockerfiles [skip ci]
eitsupi Apr 22, 2024
fca368b
build: add binder to the bake file and update the bake file generatio…
eitsupi Apr 22, 2024
fc55053
build: update docker-bake.json [skip ci]
eitsupi Apr 22, 2024
3632a8f
build: partially update Makefile [skip ci]
eitsupi Apr 22, 2024
3c21154
build: clean up files by `make setup` [skip ci]
eitsupi Apr 22, 2024
9f432a1
build: fixes for GHA matrix syntax [skip ci]
eitsupi Apr 23, 2024
1c8e9b4
ci: update GHA
eitsupi Apr 23, 2024
8cf0338
build: remove old build scripts
eitsupi Apr 23, 2024
407cb15
build: fix Makefile
eitsupi Apr 23, 2024
dd6da95
build: remove old Dockerfile and bake-json files
eitsupi Apr 23, 2024
edb71db
build: remove stack files
eitsupi Apr 23, 2024
2787e2d
build: fix bake-json format
eitsupi Apr 23, 2024
06e8498
fix: must copy bin scripts into r-ver before setup_R.sh
eitsupi Apr 23, 2024
1c675db
refactor(bakefiles): move some fields to the template side
eitsupi Apr 24, 2024
706cd96
Revert "Automatic update of container definition files (#788)"
eitsupi Apr 24, 2024
4dffc92
Merge commit '706cd964be2f250604951b25bb06c61fd017a23e' into overhaul
eitsupi Apr 24, 2024
42772bd
chore: regen files
eitsupi Apr 24, 2024
7427de3
ci: fix GHA pointed by actionlint
eitsupi Apr 24, 2024
07e82a0
build: add filles and update scripts to generate geospatial-dev-osgeo…
eitsupi Apr 28, 2024
e954696
build: regen files
eitsupi Apr 28, 2024
13cab96
build: add filles and update scripts to generate geospatial-dev-osgeo…
eitsupi Apr 28, 2024
7bed05d
build: regen files
eitsupi Apr 28, 2024
dcb5922
docs(news): add a note about repo overhaul
eitsupi Apr 28, 2024
a01a960
build: jscpd should ignore generated files
eitsupi Apr 29, 2024
14129f2
build: commit args history to the tsv file (for versions in reports)
eitsupi Apr 29, 2024
74b50d2
build: update versions.Rmd for the new repo structure
eitsupi Apr 29, 2024
8881ef1
build: fix the lack of binder target in bake-files
eitsupi Apr 29, 2024
62d98b5
build: update wiki_home.Rmd for the new repo structure
eitsupi Apr 29, 2024
a1376cd
ci: ensure inspect experimental images and ensure build wiki in PR
eitsupi Apr 29, 2024
8a5f5c0
Merge remote-tracking branch 'upstream/master' into overhaul
eitsupi Apr 29, 2024
209a4f4
ci: fix build wiki job to download experimental image info
eitsupi Apr 29, 2024
a3ccdfc
ci: tweak concurrency for PRs
eitsupi Apr 29, 2024
183265d
ci: ensure always upload the reports for checking
eitsupi Apr 29, 2024
aee06e2
build(wiki): now some rows may be duplicated, so ensure remove these
eitsupi Apr 29, 2024
907c72b
docs(wiki): fix ordering of the table content
eitsupi Apr 29, 2024
7afda5c
ci: add a new workflow to build and push experimental images
eitsupi Apr 29, 2024
57ce4c8
docs: update for the new repo structure
eitsupi Apr 29, 2024
b8df6bf
docs(wiki): tweak ordering of the table contents
eitsupi Apr 29, 2024
83c6959
build: fix the regex to ensure remove old extra docker-bake.json
eitsupi Apr 29, 2024
3d2e985
chore: re run `make setup`
eitsupi Apr 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2"
},
"ghcr.io/rocker-org/devcontainer-features/r-history:0": {}
},
"customizations": {
"vscode": {
"extensions": [
"DavidAnson.vscode-markdownlint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"foxundermoon.shell-format"
],
"settings": {
"[r]": {
"editor.tabSize": 2
}
}
}
}
}
3 changes: 3 additions & 0 deletions .github/workflows/bakefile-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: test for docker-bake.json

permissions:
contents: read

on:
pull_request:
branches:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,24 @@ jobs:
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
all-versions: ${{ steps.set-json.outputs.all-versions }}
steps:
- uses: actions/[email protected]
- id: set-json
run: |
JSON=build/matrix/latest.json
ALL=false
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
JSON=build/matrix/all.json
ALL=true
fi
echo ::set-output name=json::${JSON}
echo "json=${JSON}" >>"$GITHUB_OUTPUT"
echo "all-versions=${ALL}" >>"$GITHUB_OUTPUT"
echo ${JSON}
- id: set-matrix
run: |
CONTENT=$(jq -r 'tostring' ${{ steps.set-json.outputs.json }})
echo ::set-output name=matrix::"${CONTENT}"
echo "matrix=${CONTENT}" >>"$GITHUB_OUTPUT"
echo "${CONTENT}"

build:
Expand Down Expand Up @@ -70,3 +74,11 @@ jobs:
BAKE_GROUP=${{ matrix.group }} \
BAKE_OPTION=--push \
make bake-json-group

call-extra-workflow:
needs:
- generate_matrix
- build
uses: ./.github/workflows/extra.yml
with:
all-versions: ${{ needs.generate_matrix.outputs.all-versions }}
5 changes: 3 additions & 2 deletions .github/workflows/devel.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Push R devel images and RStudio daily build images
name: Build & Push R devel images

on:
schedule:
Expand All @@ -14,7 +14,8 @@ jobs:
strategy:
fail-fast: false
matrix:
bakefile: [devel.docker-bake.json, core-latest-daily.docker-bake.json]
bakefile:
- devel.docker-bake.json
steps:
- uses: actions/[email protected]
- uses: docker/login-action@v3
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/dockerfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- cron: "0 10 * * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
createPullRequest:
runs-on: ubuntu-latest
Expand All @@ -20,8 +24,8 @@ jobs:
install2.r --error --skipinstalled -n -1 pak
- name: Make changes to pull request
run: |
./build/make-stacks.R
make clean
Rscript build/scripts/generate-variables.R
Rscript build/scripts/generate-args.R
make setup
- name: Create Pull Request
id: cpr
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Push experimental images

on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker images
run: |
BAKE_JSON="bakefiles/experimental.docker-bake.json" \
BAKE_GROUP="default" \
BAKE_OPTION=--push \
make bake-json-group
38 changes: 32 additions & 6 deletions .github/workflows/extra.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
name: Build & Push extra images

# TODO: reconsider the triggers
on:
schedule:
- cron: "0 0 1 * *"
workflow_call:
inputs:
all-versions:
type: boolean
default: false
group:
type: string
required: false
workflow_dispatch:
inputs:
all-versions:
description: Build all versions
type: boolean
default: false
group:
description: Build a specific group
type: string
required: false

concurrency:
group: ${{ github.workflow }}
Expand All @@ -12,14 +28,23 @@ concurrency:
jobs:
generate_matrix:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/[email protected]
- id: set-matrix
run: |
CONTENT=$(jq '{ group: [.group[] | keys[] | select(. != "default")] } | tostring' -r bakefiles/extra.docker-bake.json)
echo ::set-output name=matrix::"${CONTENT}"
JSON="build/matrix/latest.json"
if [[ "${{ inputs.all-versions }}" == "true" ]]; then
JSON="build/matrix/latest-two.json"
fi
if [[ -n "${{ inputs.group }}" ]]; then
CONTENT="$(jq -s -r '.[0] + { group: [.[1].group[] | keys[] | select(. != "default")] } | tostring' $JSON build/templates/bakefiles/extra.docker-bake.json)"
else
CONTENT="$(jq -r '.group = ["${{ inputs.group }}"] | tostring' $JSON)"
fi
echo "matrix=${CONTENT}" >>"$GITHUB_OUTPUT"
echo "${CONTENT}"

build:
Expand All @@ -41,12 +66,13 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker images
run: |
BAKE_JSON=bakefiles/extra.docker-bake.json \
BAKE_JSON=bakefiles/${{ matrix.r_version }}.extra.docker-bake.json \
BAKE_GROUP=${{ matrix.group }} \
BAKE_OPTION=--push \
make bake-json-group
8 changes: 5 additions & 3 deletions .github/workflows/r-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- scripts/install_R_source.sh
- scripts/setup_R.sh
- scripts/bin/**
- dockerfiles/r-ver_devel.Dockerfile
- build/templates/dockerfiles/r-ver.Dockerfile.txt
- "!**.md"
workflow_dispatch:

Expand All @@ -22,9 +22,10 @@ jobs:
strategy:
fail-fast: true
matrix:
# TODO: use the latest tag automatically
tag:
- "devel"
- "4.0.0"
- "4.3.3"
platforms:
- linux/amd64
steps:
Expand Down Expand Up @@ -59,8 +60,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO: use the latest tag automatically
tag:
- "4.0.0"
- "4.3.3"
platforms:
- linux/amd64
script:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:

- id: set-version
run: |
NEW_VERSION=$(jq '.r_version[-1]' -r build/matrix/latest.json)
echo ::set-output name=newversion::"${NEW_VERSION}"
NEW_VERSION="$(jq '.r_version[-1]' -r build/matrix/latest.json)"
echo "newversion=${NEW_VERSION}" >>"$GITHUB_OUTPUT"
echo "${NEW_VERSION}"

- name: Bump version and push tag
Expand Down
76 changes: 63 additions & 13 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,31 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
generate_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
matrix-main: ${{ steps.set-matrix.outputs.matrix-main }}
matrix-extra: ${{ steps.set-matrix.outputs.matrix-extra }}
steps:
- uses: actions/[email protected]
- id: set-matrix
run: |
CONTENT=$(jq -r '.r_version += ["extra"] | tostring' build/matrix/all.json)
echo "matrix=${CONTENT}" >> "$GITHUB_OUTPUT"
echo "${CONTENT}"
CONTENT_MAIN="$(jq -r 'tostring' build/matrix/all.json)"
CONTENT_EXTRA="$(jq -s -r '.[0] + { group: [.[1].group[] | keys[] | select(. != "default")] } | tostring' build/matrix/latest-two.json build/templates/bakefiles/extra.docker-bake.json)"
echo "matrix-main=${CONTENT_MAIN}" >> "$GITHUB_OUTPUT"
echo "matrix-extra=${CONTENT_EXTRA}" >> "$GITHUB_OUTPUT"
echo "${CONTENT_MAIN}"

inspect:
inspect-main:
needs: generate_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix)}}
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix-main)}}
steps:
- uses: actions/[email protected]
- name: Clean up
Expand All @@ -64,9 +67,60 @@ jobs:
name: tmp
path: tmp

inspect-extra:
needs: generate_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix-extra)}}
steps:
- uses: actions/checkout@v4
- name: Clean up
run: |
docker image prune --all --force
- name: Pull images
run: |
BAKE_JSON="bakefiles/${{ matrix.r_version }}.extra.docker-bake.json" \
BAKE_GROUP="${{ matrix.group }}" \
make pull-image-group
- name: Inspect built image
run: |
IMAGELIST_NAME="${{ matrix.r_version }}-extra-${{ matrix.group }}.tsv" \
make inspect-image-all
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: tmp
path: tmp

inspect-experimental:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clean up
run: |
docker image prune --all --force
- name: Pull images
run: |
BAKE_JSON="bakefiles/experimental.docker-bake.json" \
BAKE_GROUP="default" \
make pull-image-group
- name: Inspect built image
run: |
IMAGELIST_NAME="experimental.tsv" \
make inspect-image-all
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: tmp
path: tmp

publish_reports:
if: always()
needs: inspect
needs:
- inspect-main
- inspect-extra
- inspect-experimental
runs-on: ubuntu-latest
container:
image: rocker/tidyverse:latest
Expand All @@ -76,14 +130,10 @@ jobs:
- name: Set as safe for following git commands
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout wiki
if: github.event_name != 'pull_request'
uses: actions/[email protected]
with:
repository: "${{ github.repository }}.wiki"
path: reports
# - name: clean up image list
# run:
# rm -rf reports/imagelist
- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -94,7 +144,7 @@ jobs:
make --jobs=2 report-all
make --always-make wiki-home
- name: Upload artifacts
if: github.event_name == 'pull_request'
if: always()
uses: actions/upload-artifact@v3
with:
name: reports
Expand Down
Loading
Loading