configs_install.sh: Add a TODO #341
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
name: Containers | |
# TODO try using a platform matrix and a single file for Ubuntu and Debian | |
# TODO - set trigger paths, remove unnecessary commands, unify with Ubuntu script | |
# TODO test | |
# TODO merge WSL_Debian and WSL_Ubuntu_22.04 CI into a single .yml file | |
# TODO Debian fails to build because of this bug: https://github.com/llvm/llvm-project/issues/62475 | |
# TODO - problem - changes in e.g. Kali Linux will thanks to the matrix trigger CI pipeline also for Debian etc. which might not be needed | |
# TODO add correct trigger paths (e.g. for PopOS etc.) | |
# TODO output of try_platform for Ubuntu does not show in logs | |
# TODO change * to ** in all workflows (to support nested directories) | |
# TODO The Ubuntu 22.04 container test reports success even if it filed (the timezone blocking bug) | |
# TODO the overall result for the test is reported green even though the script failed on some containers (fix) | |
# TODO fix - the workflow has a green checkmark in GitHub even if no branch was successful | |
on: | |
push: | |
# TODO add relevant paths resp. rewrite as described in the readme | |
branches: [ "devel", "testing", "stable", "LTS" ] | |
paths: | |
- '**.sh' | |
- 'Ubuntu_22.04/RootDotfiles/**' | |
- '.github/workflows/containers.yml' | |
pull_request: | |
branches: [ "devel", "testing", "stable", "LTS" ] | |
jobs: | |
distro-test: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.container }} | |
strategy: | |
fail-fast: false | |
matrix: # TODO add gnome as an additional row in the matrix | |
container: | |
- 'ubuntu:22.04' | |
- 'ubuntu:24.04' # https://hub.docker.com/_/ubuntu | |
- 'ubuntu:rolling' | |
- 'debian:12' # https://hub.docker.com/_/debian | |
- 'debian:testing' | |
- 'kalilinux/kali-rolling' # https://hub.docker.com/r/kalilinux/kali-rolling | |
- 'nycticoracs/pop_os:22.04' # PopOS TODO add link | |
container: | |
image: ${{ matrix.container }} | |
# TODO exit on push with commit message "Add a TODO" | |
# TODO - consider making these steps some kind of subroutine | |
# or some other way to avoid redundant runs in the matrix | |
# consider using dependencies for that: https://stackoverflow.com/questions/58457140/dependencies-between-workflows-on-github-actions | |
steps: # TODO - exit if the change was in the path that is not a dependency | |
# - name: "set APT to non-interactive" | |
# shell: bash | |
# run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" | |
- name: "Update APT" | |
run: "apt-get update -y" | |
- name: "Install `git` and `sudo`" | |
run: "apt-get install -y git sudo" | |
- name: "Checkout repo" | |
uses: actions/checkout@v4 | |
- name: print `github.ref=${{ github.ref }}` | |
run: echo ${{ github.ref }} | |
- name: print `github.sha=${{ github.sha }}` | |
run: echo ${{ github.sha }} | |
- name: "cat /etc/os-release" | |
run: cat /etc/os-release | |
# TODO - consider adding this to the initPC script itself | |
- name: "Set the timezone (noninteractive)" | |
run: | | |
ln -fs /usr/share/zoneinfo/Europe/Vienna /etc/localtime && \ | |
echo "tzdata tzdata/Areas select Europe" | debconf-set-selections && \ | |
echo "tzdata tzdata/Zones/Europe select Vienna" | debconf-set-selections | |
- name: Running iniPC script for the 1st time should not fail. | |
run: ./run_init.sh --noninteractive | |
- name: save ~/ for idempotency test | |
run: cp -r ~/ /tmp/old_home/ | |
- name: Running iniPC script for the 2nd time should not fail. | |
run: ./run_init.sh --noninteractive | |
# TODO split this command to multiple lines | |
# TODO also test that the first run of initPC script does change the state of home dir | |
# TODO - test whether the test works as expected | |
# TODO sync the idempotency test between linux distros (this is the most recent) | |
- name: The initPC script should be idempotent on ~/ directory (WIP - needs testing) | |
run: | | |
cd ~ | |
pwd | |
find . -type f \( \ | |
! -path "./.cargo/.global-cache" \ | |
! -path "./.cache/*" \ | |
! -path "./.dotfiles/logs/HEAD" \ | |
! -path "*work/_temp/*" \ | |
! -path "./runners/*" \ | |
! -path "./x/helix/target/release/.fingerprint/*" \ | |
! -path "./.cargo/registry/index/*" \ | |
! -path "./x/helix/target/release/build/helix-term*" \ | |
! -path "./x/helix/target/.rustc_info.json" \ | |
! -iname "*.log" \ | |
! -name ".wget-hsts" \ | |
\) -print0 | | |
xargs -0 -I{} bash -c 'if ! diff -C 30 "/tmp/old_home/$1" "$1"; then echo "diff failed for: $1"; exit 1; fi' bash {} |