Skip to content

Commit

Permalink
docs: Instructions and supporting script for a clean working copy
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Dec 8, 2024
1 parent 6c65d04 commit 1465ced
Show file tree
Hide file tree
Showing 4 changed files with 244 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ Build scripts for GitHub actions are always stored in the [workflows](./workflow
The [examples](./examples) directory contains scripts to show how to build R locally. Basically these scripts just let you run the same steps as the CI in [build-svn.yaml](./workflows/build-svn.yaml) for a given platform:

- [build-r-macos.sh](./examples/build-r-macos.sh): do a full prep, build, and check on MacOS.

## Develop locally

For local development, `git status` should accurately reflect the state of the repository.
A default clone will have the following two problems:

- A large amount of untracked unignored files.
- A change in `Makefile.in` necessitated by having to build from a Git clone.

The [local](./local) directory contains files to help with these issues:

- [dot-gitignore](./local/dot-gitignore): A `.gitignore` file ready to copy to the root of the project.
- [post-checkout](./local/post-checkout): A script to update the `SVNINFO` file after each checkout or commit.

Run the [setup.sh](./local/setup.sh) script for automated setup.
213 changes: 213 additions & 0 deletions .github/local/dot-gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
/.gitignore
*.o
*.d
*.a
*.so
*.dylib
/src/library/Recommended/*
/.cache/
/.editorconfig
/Makeconf
/Makefile
/Makefile.in.bak
/Makefrag.cc
/Makefrag.cc_lo
/Makefrag.cxx
/Makefrag.m
/SVNINFO
/SVN-REVISION
/bin/
/compile_commands.json
/config.log
/config.status
/cran.rstudio.com/
/doc/FAQ
/doc/Makefile
/doc/NEWS
/doc/NEWS.2.rds
/doc/NEWS.3.rds
/doc/NEWS.rds
/doc/R.1
/doc/RESOURCES
/doc/Rscript.1
/doc/html/Makefile
/doc/html/NEWS.html
/doc/html/index.html
/doc/html/resources.html
/doc/manual/Makefile
/etc/Makeconf
/etc/Makefile
/etc/Renviron
/etc/javaconf
/etc/ldpaths
/include/
/libconftest.dSYM/
/library/
/libtool
/m4/Makefile
/non-tarball
/po/Makefile
/share/Makefile
/share/zoneinfo/
/src/Makefile
/src/appl/Makedeps
/src/appl/Makefile
/src/extra/Makefile
/src/extra/blas/Makefile
/src/extra/intl/Makedeps
/src/extra/intl/Makefile
/src/extra/intl/charset.alias
/src/extra/intl/charsetalias.h
/src/extra/intl/libgnuintl.h
/src/extra/tre/Makedeps
/src/extra/tre/Makefile
/src/extra/tzone/Makedeps
/src/extra/tzone/Makefile
/src/extra/xdr/Makefile
/src/include/Makefile
/src/include/R.ts
/src/include/R_ext/Altrep.ts
/src/include/R_ext/Applic.ts
/src/include/R_ext/Arith.ts
/src/include/R_ext/BLAS.ts
/src/include/R_ext/Boolean.ts
/src/include/R_ext/Callbacks.ts
/src/include/R_ext/Complex.ts
/src/include/R_ext/Connections.ts
/src/include/R_ext/Constants.ts
/src/include/R_ext/Error.ts
/src/include/R_ext/GetX11Image.ts
/src/include/R_ext/GraphicsDevice.ts
/src/include/R_ext/GraphicsEngine.ts
/src/include/R_ext/Itermacros.ts
/src/include/R_ext/Lapack.ts
/src/include/R_ext/Linpack.ts
/src/include/R_ext/Makefile
/src/include/R_ext/MathThreads.ts
/src/include/R_ext/Memory.ts
/src/include/R_ext/Parse.ts
/src/include/R_ext/Print.ts
/src/include/R_ext/PrtUtil.ts
/src/include/R_ext/QuartzDevice.ts
/src/include/R_ext/RS.ts
/src/include/R_ext/RStartup.ts
/src/include/R_ext/Rallocators.ts
/src/include/R_ext/Random.ts
/src/include/R_ext/Rdynload.ts
/src/include/R_ext/Riconv.ts
/src/include/R_ext/Utils.ts
/src/include/R_ext/Visibility.ts
/src/include/R_ext/eventloop.ts
/src/include/R_ext/libextern.ts
/src/include/R_ext/stamp-R
/src/include/R_ext/stats_package.ts
/src/include/R_ext/stats_stubs.ts
/src/include/Rconfig.h
/src/include/Rconfig.tsa
/src/include/Rdefines.ts
/src/include/Rembedded.ts
/src/include/Rinterface.ts
/src/include/Rinternals.ts
/src/include/Rmath.h
/src/include/Rmath.h0
/src/include/Rmath.tsa
/src/include/Rversion.h
/src/include/Rversion.tsa
/src/include/config.h
/src/include/libintl.h
/src/include/stamp-R
/src/include/stamp-h
/src/library/.vignettes/
/src/library/Makefile
/src/library/base/DESCRIPTION
/src/library/base/Makefile
/src/library/base/all.R
/src/library/compiler/DESCRIPTION
/src/library/compiler/Makefile
/src/library/compiler/all.R
/src/library/datasets/DESCRIPTION
/src/library/datasets/Makefile
/src/library/grDevices/DESCRIPTION
/src/library/grDevices/Makefile
/src/library/grDevices/all.R
/src/library/grDevices/src/Makedeps
/src/library/grDevices/src/Makefile
/src/library/grDevices/src/cairo/Makefile
/src/library/graphics/DESCRIPTION
/src/library/graphics/Makefile
/src/library/graphics/all.R
/src/library/graphics/src/Makedeps
/src/library/graphics/src/Makefile
/src/library/grid/DESCRIPTION
/src/library/grid/Makefile
/src/library/grid/all.R
/src/library/grid/src/Makedeps
/src/library/grid/src/Makefile
/src/library/methods/DESCRIPTION
/src/library/methods/Makefile
/src/library/methods/all.R
/src/library/methods/src/Makedeps
/src/library/methods/src/Makefile
/src/library/parallel/DESCRIPTION
/src/library/parallel/Makefile
/src/library/parallel/all.R
/src/library/parallel/src/Makedeps
/src/library/parallel/src/Makefile
/src/library/profile/Makefile
/src/library/splines/DESCRIPTION
/src/library/splines/Makefile
/src/library/splines/all.R
/src/library/splines/src/Makedeps
/src/library/splines/src/Makefile
/src/library/stats/DESCRIPTION
/src/library/stats/Makefile
/src/library/stats/all.R
/src/library/stats/src/Makedeps
/src/library/stats/src/Makefile
/src/library/stats4/DESCRIPTION
/src/library/stats4/Makefile
/src/library/stats4/all.R
/src/library/tcltk/DESCRIPTION
/src/library/tcltk/Makefile
/src/library/tcltk/src/Makefile
/src/library/tools/DESCRIPTION
/src/library/tools/Makefile
/src/library/tools/all.R
/src/library/tools/src/Makedeps
/src/library/tools/src/Makefile
/src/library/translations/DESCRIPTION
/src/library/translations/Makefile
/src/library/utils/DESCRIPTION
/src/library/utils/Makefile
/src/library/utils/all.R
/src/library/utils/src/Makedeps
/src/library/utils/src/Makefile
/src/main/Makedeps
/src/main/Makefile
/src/main/R.bin
/src/modules/Makefile
/src/modules/X11/Makefile
/src/modules/internet/Makedeps
/src/modules/internet/Makefile
/src/modules/lapack/Makedeps
/src/modules/lapack/Makefile
/src/nmath/Makedeps
/src/nmath/Makefile
/src/nmath/standalone/Makefile
/src/scripts/Makefile
/src/scripts/R.fe
/src/scripts/R.sh
/src/scripts/Rcmd
/src/scripts/javareconf
/src/scripts/mkinstalldirs
/src/scripts/pager
/src/scripts/rtags
/src/unix/Makedeps
/src/unix/Makefile
/src/unix/Rscript
/src/unix/Rscript.dSYM/
/stamp-java
/tests/Embedding/Makefile
/tests/Examples/Makefile
/tests/Makefile
/tools/Makefile
5 changes: 5 additions & 0 deletions .github/local/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

echo "post-checkout: Updating SVNINFO"
./.github/scripts/svn-info.sh > SVNINFO

11 changes: 11 additions & 0 deletions .github/local/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -ex

cd $(dirname $0)/../..
rm -f .gitignore
cp .github/local/dot-gitignore .gitignore

cd .git/hooks
rm -f post-checkout
cp ../../.github/local/post-checkout .

0 comments on commit 1465ced

Please sign in to comment.