From ad1e27f03274a12cd4317460396c65149237f39f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:04:39 +0300 Subject: [PATCH 001/117] Trying to create a custom action. --- .github/actions/setup/action.yml | 33 ++++++++++++++++++++++++++++++++ .github/workflows/install.yml | 33 +------------------------------- .gitignore | 3 ++- qlfile | 0 qlfile.lock | 4 ++++ 5 files changed, 40 insertions(+), 33 deletions(-) create mode 100644 .github/actions/setup/action.yml create mode 100644 qlfile create mode 100644 qlfile.lock diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..d7b05f0 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,33 @@ +name: 'Install Roswell & Qlot' +runs: + - name: Current Env + run: | + env | sort -u + + - name: Install Roswell + run: | + if [[ "$OS" == "ubuntu-latest" ]]; then + sudo apt-get -y install git build-essential automake libcurl4-openssl-dev + fi + if [[ "$OS" == "macos-latest" ]]; then + brew install automake autoconf curl + fi + + curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh + + echo $HOME/.roswell/bin >> $GITHUB_PATH + - name: Upgrade ASDF to the Latest Version + run: | + ros install asdf + - name: Install Qlot + run: | + ros install qlot + echo .qlot/bin >> $GITHUB_PATH + - name: Install Dependencies + run: | + rm -fr qlfile + touch qlfile + if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then + echo dist ultralisp http://dist.ultralisp.org/ >> qlfile + fi + qlot install diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 26b3df2..4d44633 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -63,38 +63,7 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Show ENV - run: | - env | sort -u - - name: Install Roswell - run: | - if [[ "$OS" == "ubuntu-latest" ]]; then - sudo apt-get -y install git build-essential automake libcurl4-openssl-dev - fi - if [[ "$OS" == "macos-latest" ]]; then - brew install automake autoconf curl - fi - - curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh - - echo $HOME/.roswell/bin >> $GITHUB_PATH - - name: Upgrade ASDF to the Latest Version - run: | - ros install asdf - - name: Install Qlot - run: | - ros install qlot - echo .qlot/bin >> $GITHUB_PATH - - name: Install Dependencies - run: | - rm -fr qlfile - touch qlfile - - if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then - echo dist ultralisp http://dist.ultralisp.org/ >> qlfile - fi - - qlot install + - uses: .github/actions/setup - name: Install System run: | if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then diff --git a/.gitignore b/.gitignore index ea23d3b..8abc0d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /docs/build/ -/env/ \ No newline at end of file +/env/ +/.qlot diff --git a/qlfile b/qlfile new file mode 100644 index 0000000..e69de29 diff --git a/qlfile.lock b/qlfile.lock new file mode 100644 index 0000000..8e62492 --- /dev/null +++ b/qlfile.lock @@ -0,0 +1,4 @@ +("quicklisp" . + (:class qlot/source/dist:source-dist + :initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest) + :version "2021-01-24")) From a067587b333074b3ea13993b5add21c11640dbb6 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:11:27 +0300 Subject: [PATCH 002/117] Full path. --- .github/workflows/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 4d44633..644e4e6 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -63,7 +63,7 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: .github/actions/setup + - uses: 40ants/cl-info/.github/actions/setup - name: Install System run: | if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then From 1f00ed781e4f051a404cf15b9310a54d8a0a3015 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:12:35 +0300 Subject: [PATCH 003/117] Added a branch. --- .github/workflows/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 644e4e6..c5ca39f 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -63,7 +63,7 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: 40ants/cl-info/.github/actions/setup + - uses: 40ants/cl-info/.github/actions/setup@custom-action - name: Install System run: | if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then From 259b5c1988bdc4e05a162cc3d778f9bf3897add0 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:17:34 +0300 Subject: [PATCH 004/117] Fixed indentation. --- .github/actions/setup/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d7b05f0..3afba58 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,7 +1,7 @@ name: 'Install Roswell & Qlot' runs: - - name: Current Env - run: | + - name: Current Env + run: | env | sort -u - name: Install Roswell From a91d5d125c36dff20b024b2a26efdddb9bdeb4c4 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:19:57 +0300 Subject: [PATCH 005/117] Fixed action code. --- .github/actions/setup/action.yml | 64 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 3afba58..d7fde00 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,33 +1,35 @@ name: 'Install Roswell & Qlot' runs: - - name: Current Env - run: | - env | sort -u - - - name: Install Roswell - run: | - if [[ "$OS" == "ubuntu-latest" ]]; then - sudo apt-get -y install git build-essential automake libcurl4-openssl-dev - fi - if [[ "$OS" == "macos-latest" ]]; then - brew install automake autoconf curl - fi - - curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh - - echo $HOME/.roswell/bin >> $GITHUB_PATH - - name: Upgrade ASDF to the Latest Version - run: | - ros install asdf - - name: Install Qlot - run: | - ros install qlot - echo .qlot/bin >> $GITHUB_PATH - - name: Install Dependencies - run: | - rm -fr qlfile - touch qlfile - if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then - echo dist ultralisp http://dist.ultralisp.org/ >> qlfile - fi - qlot install + using: composite + steps: + - name: Current Env + run: | + env | sort -u + + - name: Install Roswell + run: | + if [[ "$OS" == "ubuntu-latest" ]]; then + sudo apt-get -y install git build-essential automake libcurl4-openssl-dev + fi + if [[ "$OS" == "macos-latest" ]]; then + brew install automake autoconf curl + fi + + curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh + + echo $HOME/.roswell/bin >> $GITHUB_PATH + - name: Upgrade ASDF to the Latest Version + run: | + ros install asdf + - name: Install Qlot + run: | + ros install qlot + echo .qlot/bin >> $GITHUB_PATH + - name: Install Dependencies + run: | + rm -fr qlfile + touch qlfile + if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then + echo dist ultralisp http://dist.ultralisp.org/ >> qlfile + fi + qlot install From 43afb346afe7c8f41c90e772143c1202dfd7474d Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:21:14 +0300 Subject: [PATCH 006/117] Commented out most matrix combinations. --- .github/workflows/install.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index c5ca39f..6ac3ab6 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -21,18 +21,18 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest + # - macos-latest quicklisp-dist: - quicklisp - - ultralisp + # - ultralisp lisp: - sbcl-bin - - ccl-bin - - ecl - - abcl - - allegro - - clisp - - cmucl + # - ccl-bin + # - ecl + # - abcl + # - allegro + # - clisp + # - cmucl include: # Seems allegro is does not support 64bit OSX. # Unable to install it using Roswell: From a3e2f196c2b90056b5054d89d29936cc014fd91e Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:22:18 +0300 Subject: [PATCH 007/117] Added shell: bash. --- .github/actions/setup/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d7fde00..56d8cc5 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -3,6 +3,7 @@ runs: using: composite steps: - name: Current Env + shell: bash run: | env | sort -u @@ -19,13 +20,16 @@ runs: echo $HOME/.roswell/bin >> $GITHUB_PATH - name: Upgrade ASDF to the Latest Version + shell: bash run: | ros install asdf - name: Install Qlot + shell: bash run: | ros install qlot echo .qlot/bin >> $GITHUB_PATH - name: Install Dependencies + shell: bash run: | rm -fr qlfile touch qlfile From c27a4c3d98e050dd14b1aed9ae4b5e7a711fa545 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 09:23:15 +0300 Subject: [PATCH 008/117] More more shell: bash --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 56d8cc5..384bae7 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -6,8 +6,8 @@ runs: shell: bash run: | env | sort -u - - name: Install Roswell + shell: bash run: | if [[ "$OS" == "ubuntu-latest" ]]; then sudo apt-get -y install git build-essential automake libcurl4-openssl-dev From 2e1a82b0953a73750cb377fc64d2dac23ac62b1a Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:16:27 +0300 Subject: [PATCH 009/117] Install ngrok --- .github/actions/setup/action.yml | 50 +++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 384bae7..e45cad1 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,11 +1,29 @@ name: 'Install Roswell & Qlot' + +inputs: + qlfile-template: + description: 'Jinja template for qlfile' + required: false + default: | + + lisp-system: + description: 'ASDF system to install and test' + required: false + run-tests: + description: A command to run tests + required: false + default: | + qlot exec ros --eval '(asdf:test-system :${{ inputs.lisp-system }})' --quit + runs: using: composite steps: - name: Current Env shell: bash run: | + echo ::group::Environment env | sort -u + echo ::endgroup:: - name: Install Roswell shell: bash run: | @@ -28,12 +46,36 @@ runs: run: | ros install qlot echo .qlot/bin >> $GITHUB_PATH + + - name: Start SSH session + uses: luchihoratiu/debug-via-ssh@main + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + NGROK_REGION: eu + SSH_PASS: ${{ secrets.SSH_PASS }} + - name: Install Dependencies shell: bash run: | - rm -fr qlfile - touch qlfile - if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then + if [[ -e qlfile ]]; then + rm -fr qlfile.lock + else: + if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then echo dist ultralisp http://dist.ultralisp.org/ >> qlfile + fi fi - qlot install + qlot install + - name: Install System + run: | + if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then + qlot exec ros install 40ants/defmain + fi + + qlot exec ros install cl-info + - name: Install System + run: | + if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then + qlot exec ros install 40ants/defmain + fi + + qlot exec ros install cl-info From 0b0ef9e9f5dff4093e7740e8acc2efa68737a979 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:17:08 +0300 Subject: [PATCH 010/117] Fixed template. --- .github/actions/setup/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index e45cad1..6fa4302 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,8 +4,8 @@ inputs: qlfile-template: description: 'Jinja template for qlfile' required: false - default: | - + default: 'no temlplate' + lisp-system: description: 'ASDF system to install and test' required: false From 7a15d3f3605c860a450bc9172c72ea4ddbcc3f99 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:20:16 +0300 Subject: [PATCH 011/117] Moved debug section. --- .github/actions/setup/action.yml | 7 ------- .github/workflows/install.yml | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 6fa4302..7d4fe9b 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -47,13 +47,6 @@ runs: ros install qlot echo .qlot/bin >> $GITHUB_PATH - - name: Start SSH session - uses: luchihoratiu/debug-via-ssh@main - with: - NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} - NGROK_REGION: eu - SSH_PASS: ${{ secrets.SSH_PASS }} - - name: Install Dependencies shell: bash run: | diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 6ac3ab6..64648f7 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -63,6 +63,13 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Start SSH session + uses: luchihoratiu/debug-via-ssh@main + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + NGROK_REGION: eu + SSH_PASS: ${{ secrets.SSH_PASS }} + - uses: 40ants/cl-info/.github/actions/setup@custom-action - name: Install System run: | From 499da89ade6b65d7864194b46bd1413afe29154c Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:20:43 +0300 Subject: [PATCH 012/117] Commented include ection. --- .github/workflows/install.yml | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 64648f7..c443b37 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -33,24 +33,24 @@ jobs: # - allegro # - clisp # - cmucl - include: - # Seems allegro is does not support 64bit OSX. - # Unable to install it using Roswell: - # alisp is not executable. Missing 32bit glibc? - - lisp: allegro - os: macos-latest - can-fail: true - # CLisp on Ubuntu can't be installed because of the error: - # # does not have - # the required size or alignment - - lisp: clisp - os: ubuntu-latest - can-fail: true - # CMUCL is 32bit and cant' work on 64bit OSX: - # .roswell/impls/x86-64/darwin/cmu-bin/21d/bin/lisp is not executable. Missing 32bit glibc? - - lisp: cmucl - os: macos-latest - can-fail: true + # include: + # # Seems allegro is does not support 64bit OSX. + # # Unable to install it using Roswell: + # # alisp is not executable. Missing 32bit glibc? + # - lisp: allegro + # os: macos-latest + # can-fail: true + # # CLisp on Ubuntu can't be installed because of the error: + # # # does not have + # # the required size or alignment + # - lisp: clisp + # os: ubuntu-latest + # can-fail: true + # # CMUCL is 32bit and cant' work on 64bit OSX: + # # .roswell/impls/x86-64/darwin/cmu-bin/21d/bin/lisp is not executable. Missing 32bit glibc? + # - lisp: cmucl + # os: macos-latest + # can-fail: true runs-on: ${{ matrix.os }} From 4acf3b17913d029a5c956827e16d789358bb0584 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:22:17 +0300 Subject: [PATCH 013/117] Added default. --- .github/actions/setup/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 7d4fe9b..ffd7961 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,11 +4,11 @@ inputs: qlfile-template: description: 'Jinja template for qlfile' required: false - default: 'no temlplate' - + default: 'no temlplate' lisp-system: description: 'ASDF system to install and test' required: false + default: '' run-tests: description: A command to run tests required: false From dbe74c698a2cfe8d01a3339d9c60f5830e7190d2 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:23:23 +0300 Subject: [PATCH 014/117] Fixed indentation. --- .github/actions/setup/action.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index ffd7961..6700877 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,7 +4,7 @@ inputs: qlfile-template: description: 'Jinja template for qlfile' required: false - default: 'no temlplate' + default: 'no temlplate' lisp-system: description: 'ASDF system to install and test' required: false @@ -58,17 +58,17 @@ runs: fi fi qlot install - - name: Install System - run: | - if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - qlot exec ros install 40ants/defmain - fi + - name: Install System + run: | + if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then + qlot exec ros install 40ants/defmain + fi - qlot exec ros install cl-info - - name: Install System - run: | - if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - qlot exec ros install 40ants/defmain - fi + qlot exec ros install cl-info + - name: Install System + run: | + if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then + qlot exec ros install 40ants/defmain + fi - qlot exec ros install cl-info + qlot exec ros install cl-info From 0bdb9295a78419ed70f9587e00da8db5c029ff2f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:24:39 +0300 Subject: [PATCH 015/117] Added shell-bash. --- .github/actions/setup/action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 6700877..adb7da3 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,10 +5,10 @@ inputs: description: 'Jinja template for qlfile' required: false default: 'no temlplate' - lisp-system: - description: 'ASDF system to install and test' - required: false - default: '' + # lisp-system: + # description: 'ASDF system to install and test' + # required: false + # default: '' run-tests: description: A command to run tests required: false @@ -59,6 +59,7 @@ runs: fi qlot install - name: Install System + shell: bash run: | if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then qlot exec ros install 40ants/defmain @@ -66,6 +67,7 @@ runs: qlot exec ros install cl-info - name: Install System + shell: bash run: | if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then qlot exec ros install 40ants/defmain From bd260e976c95f40d706ca43289cddcd713979d83 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:26:39 +0300 Subject: [PATCH 016/117] Fixed template. --- .github/actions/setup/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index adb7da3..dee7411 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,15 +5,15 @@ inputs: description: 'Jinja template for qlfile' required: false default: 'no temlplate' - # lisp-system: - # description: 'ASDF system to install and test' - # required: false - # default: '' + lisp-system: + description: 'ASDF system to install and test' + required: false + default: '' run-tests: description: A command to run tests required: false default: | - qlot exec ros --eval '(asdf:test-system :${{ inputs.lisp-system }})' --quit + qlot exec ros --eval '(asdf:test-system :{{ lisp-system }})' --quit runs: using: composite From 5ff4cbc2b5a6dcaa07b4e4c2bae7a1ef7062aa82 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:46:49 +0300 Subject: [PATCH 017/117] Checking output of the input into a file. --- .github/actions/setup/action.yml | 62 +++++++++++++++++++------------- .github/workflows/install.yml | 26 +++++++------- 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index dee7411..164b925 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,7 +4,7 @@ inputs: qlfile-template: description: 'Jinja template for qlfile' required: false - default: 'no temlplate' + default: 'The Template' lisp-system: description: 'ASDF system to install and test' required: false @@ -22,11 +22,16 @@ runs: shell: bash run: | echo ::group::Environment + echo "Current dir:" + pwd + + echo "Environment Variables:" env | sort -u echo ::endgroup:: - name: Install Roswell shell: bash run: | + echo ::group::Install Roswell if [[ "$OS" == "ubuntu-latest" ]]; then sudo apt-get -y install git build-essential automake libcurl4-openssl-dev fi @@ -37,40 +42,49 @@ runs: curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh echo $HOME/.roswell/bin >> $GITHUB_PATH + echo ::endgroup:: - name: Upgrade ASDF to the Latest Version shell: bash run: | + echo ::group::Upgrade ASDF ros install asdf + echo ::endgroup:: - name: Install Qlot shell: bash run: | + echo ::group::Install Qlot ros install qlot echo .qlot/bin >> $GITHUB_PATH + echo ::endgroup:: - - name: Install Dependencies + - name: Test shell: bash run: | - if [[ -e qlfile ]]; then - rm -fr qlfile.lock - else: - if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then - echo dist ultralisp http://dist.ultralisp.org/ >> qlfile - fi - fi - qlot install - - name: Install System - shell: bash - run: | - if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - qlot exec ros install 40ants/defmain - fi + echo ${{ inputs.qlfile-template }} > qlfile + # - name: Install Dependencies + # shell: bash + # run: | + # if [[ -e qlfile ]]; then + # rm -fr qlfile.lock + # else: + # if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then + # echo dist ultralisp http://dist.ultralisp.org/ >> qlfile + # fi + # fi + # qlot install + # - name: Install System + # shell: bash + # run: | + # if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then + # qlot exec ros install 40ants/defmain + # fi - qlot exec ros install cl-info - - name: Install System - shell: bash - run: | - if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - qlot exec ros install 40ants/defmain - fi + # qlot exec ros install cl-info + # - name: Install System + # shell: bash + # run: | + # if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then + # qlot exec ros install 40ants/defmain + # fi - qlot exec ros install cl-info + # qlot exec ros install cl-info diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index c443b37..43d8c39 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -63,6 +63,7 @@ jobs: steps: - uses: actions/checkout@v1 + - uses: 40ants/cl-info/.github/actions/setup@custom-action - name: Start SSH session uses: luchihoratiu/debug-via-ssh@main with: @@ -70,17 +71,16 @@ jobs: NGROK_REGION: eu SSH_PASS: ${{ secrets.SSH_PASS }} - - uses: 40ants/cl-info/.github/actions/setup@custom-action - - name: Install System - run: | - if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - qlot exec ros install 40ants/defmain - fi + # - name: Install System + # run: | + # if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then + # qlot exec ros install 40ants/defmain + # fi - qlot exec ros install cl-info - - name: Run Tests - run: | - set -x - qlot exec cl-info --help - qlot exec cl-info --version - qlot exec cl-info cl-info + # qlot exec ros install cl-info + # - name: Run Tests + # run: | + # set -x + # qlot exec cl-info --help + # qlot exec cl-info --version + # qlot exec cl-info cl-info From 39d1d76bfcf6c0cc0d0e41463008ef288fae9829 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:53:35 +0300 Subject: [PATCH 018/117] Added test roswell step --- .github/actions/setup/action.yml | 10 ++++++++++ .github/workflows/install.yml | 12 ++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 164b925..ff4b04d 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -57,6 +57,16 @@ runs: echo .qlot/bin >> $GITHUB_PATH echo ::endgroup:: + - name: Test Ros + shell: ros -Q -- $0 "$@" + run: | + (progn + (ros:ensure-asdf) + #+quicklisp + (ql:quickload '() :silent t)) + + (format t "Hello World!~%") + - name: Test shell: bash run: | diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 43d8c39..8ffee4b 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -64,12 +64,12 @@ jobs: steps: - uses: actions/checkout@v1 - uses: 40ants/cl-info/.github/actions/setup@custom-action - - name: Start SSH session - uses: luchihoratiu/debug-via-ssh@main - with: - NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} - NGROK_REGION: eu - SSH_PASS: ${{ secrets.SSH_PASS }} + # - name: Start SSH session + # uses: luchihoratiu/debug-via-ssh@main + # with: + # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + # NGROK_REGION: eu + # SSH_PASS: ${{ secrets.SSH_PASS }} # - name: Install System # run: | From 5276c6aaf1f44026226e6a9391af08a09ce72fc4 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 10:55:41 +0300 Subject: [PATCH 019/117] Fixed format string. --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index ff4b04d..1fbfa15 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -58,7 +58,7 @@ runs: echo ::endgroup:: - name: Test Ros - shell: ros -Q -- $0 "$@" + shell: ros -Q -- ${0} "$@" run: | (progn (ros:ensure-asdf) From c2b884c3d040c331c6aa8a2a8c18713047029d70 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 11:00:54 +0300 Subject: [PATCH 020/117] Yet another fix. --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 1fbfa15..b0e8f7c 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -58,7 +58,7 @@ runs: echo ::endgroup:: - name: Test Ros - shell: ros -Q -- ${0} "$@" + shell: ros -Q -- {0} "$@" run: | (progn (ros:ensure-asdf) From d40aed9446fadd9377b8b43386e98bac9e22ce0d Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 11:09:28 +0300 Subject: [PATCH 021/117] Run ros script. --- .github/actions/setup/action.yml | 14 +++++++++----- .github/actions/setup/templater.ros | 20 ++++++++++++++++++++ .github/workflows/install.yml | 2 +- 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100755 .github/actions/setup/templater.ros diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index b0e8f7c..fe7314c 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -65,12 +65,16 @@ runs: #+quicklisp (ql:quickload '() :silent t)) - (format t "Hello World!~%") + (defun main () + (format t "Lisp: ~A ~A~%ASDF: ~A~%" + (lisp-implementation-version) + (lisp-implementation-type) + (asdf:asdf-version))) - - name: Test - shell: bash - run: | - echo ${{ inputs.qlfile-template }} > qlfile + # - name: Test + # shell: bash + # run: | + # echo ${{ inputs.qlfile-template }} > qlfile # - name: Install Dependencies # shell: bash # run: | diff --git a/.github/actions/setup/templater.ros b/.github/actions/setup/templater.ros new file mode 100755 index 0000000..eba3734 --- /dev/null +++ b/.github/actions/setup/templater.ros @@ -0,0 +1,20 @@ +#!/bin/sh +#|-*- mode:lisp -*-|# +#| +exec ros -Q -- $0 "$@" +|# +(progn + (ros:ensure-asdf) + #+quicklisp + (ql:quickload '(cl-mustache) + :silent t)) + +(defpackage :ros.script.templater + (:use :cl)) +(in-package :ros.script.templater) + + +(defun main (&rest argv) + (declare (ignorable argv))) + +;;; vim: set ft=lisp lisp: diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 8ffee4b..e56196f 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -27,7 +27,7 @@ jobs: # - ultralisp lisp: - sbcl-bin - # - ccl-bin + - ccl-bin # - ecl # - abcl # - allegro From 5e60fd2454fcf8734c74a609cfd8669e2dead735 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 11:24:35 +0300 Subject: [PATCH 022/117] Fixed running main. --- .github/actions/setup/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index fe7314c..bb59037 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -65,7 +65,8 @@ runs: #+quicklisp (ql:quickload '() :silent t)) - (defun main () + (defun main (args) + (declare (ignore args)) (format t "Lisp: ~A ~A~%ASDF: ~A~%" (lisp-implementation-version) (lisp-implementation-type) From 9da96990aaa667da0d25d6962a8fd1f9b33cb575 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 11:43:43 +0300 Subject: [PATCH 023/117] Trying group. --- .github/actions/setup/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index bb59037..f911c37 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -57,7 +57,7 @@ runs: echo .qlot/bin >> $GITHUB_PATH echo ::endgroup:: - - name: Test Ros + - name: Run a custom Roswell Script shell: ros -Q -- {0} "$@" run: | (progn @@ -67,10 +67,12 @@ runs: (defun main (args) (declare (ignore args)) + (format t "::group::Custom Roswell Script~%") (format t "Lisp: ~A ~A~%ASDF: ~A~%" (lisp-implementation-version) (lisp-implementation-type) - (asdf:asdf-version))) + (asdf:asdf-version)) + (format t "::endgroup::~%")) # - name: Test # shell: bash From 13c6cce095b4a495f3749f162ea89d95b3fa9ece Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 19:19:10 +0300 Subject: [PATCH 024/117] Running custom lisp code as a Action sstep. --- .github/actions/setup/action.yml | 37 ++++++++++++++++++++------------ .github/workflows/install.yml | 16 ++++++++++++++ 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f911c37..1ddff5f 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -15,6 +15,10 @@ inputs: default: | qlot exec ros --eval '(asdf:test-system :{{ lisp-system }})' --quit + custom-code: + required: false + + runs: using: composite steps: @@ -57,22 +61,27 @@ runs: echo .qlot/bin >> $GITHUB_PATH echo ::endgroup:: + # - name: Run a custom Roswell Script + # shell: ros -Q -- {0} "$@" + # run: | + # (progn + # (ros:ensure-asdf) + # #+quicklisp + # (ql:quickload '() :silent t)) + + # (defun main (args) + # (declare (ignore args)) + # (format t "::group::Custom Roswell Script~%") + # (format t "Lisp: ~A ~A~%ASDF: ~A~%" + # (lisp-implementation-version) + # (lisp-implementation-type) + # (asdf:asdf-version)) + # (format t "::endgroup::~%")) + - name: Run a custom Roswell Script shell: ros -Q -- {0} "$@" - run: | - (progn - (ros:ensure-asdf) - #+quicklisp - (ql:quickload '() :silent t)) - - (defun main (args) - (declare (ignore args)) - (format t "::group::Custom Roswell Script~%") - (format t "Lisp: ~A ~A~%ASDF: ~A~%" - (lisp-implementation-version) - (lisp-implementation-type) - (asdf:asdf-version)) - (format t "::endgroup::~%")) + run: ${{ inputs.custom-code }} + if: ${{ inputs.custom-code }} # - name: Test # shell: bash diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index e56196f..0996db8 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -64,6 +64,22 @@ jobs: steps: - uses: actions/checkout@v1 - uses: 40ants/cl-info/.github/actions/setup@custom-action + with: + - custom-code: | + (progn + (ros:ensure-asdf) + #+quicklisp + (ql:quickload '() :silent t)) + + (defun main (args) + (declare (ignore args)) + (format t "::group::Custom Roswell Script~%") + (format t "Lisp: ~A ~A~%ASDF: ~A~%" + (lisp-implementation-version) + (lisp-implementation-type) + (asdf:asdf-version)) + (format t "::endgroup::~%")) + # - name: Start SSH session # uses: luchihoratiu/debug-via-ssh@main # with: From 8102c14cb195702c8d1fc04f071c953061aa1aee Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 19:20:23 +0300 Subject: [PATCH 025/117] Fixed fucking YAML. --- .github/workflows/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 0996db8..89107b7 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -65,7 +65,7 @@ jobs: - uses: actions/checkout@v1 - uses: 40ants/cl-info/.github/actions/setup@custom-action with: - - custom-code: | + custom-code: | (progn (ros:ensure-asdf) #+quicklisp From fe42215b30e47b4838263a7b2d1714fd6a43601c Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 19:23:44 +0300 Subject: [PATCH 026/117] Moved if higher. --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 1ddff5f..4369bfe 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -79,9 +79,9 @@ runs: # (format t "::endgroup::~%")) - name: Run a custom Roswell Script + if: ${{ inputs.custom-code }} shell: ros -Q -- {0} "$@" run: ${{ inputs.custom-code }} - if: ${{ inputs.custom-code }} # - name: Test # shell: bash From fa5b1aa93e371b5d9c5216ce4637a36acc3a2837 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 19:28:12 +0300 Subject: [PATCH 027/117] Conditionals aren't supported. --- .github/actions/setup/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 4369bfe..e9ee3ed 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -79,7 +79,6 @@ runs: # (format t "::endgroup::~%")) - name: Run a custom Roswell Script - if: ${{ inputs.custom-code }} shell: ros -Q -- {0} "$@" run: ${{ inputs.custom-code }} From 2f7b12f2120ddd934fbf07d42b691391da489c44 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 19:33:25 +0300 Subject: [PATCH 028/117] trying to specify only a part in the script. --- .github/actions/setup/action.yml | 12 +++++++++++- .github/workflows/install.yml | 17 ++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index e9ee3ed..6e92368 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -80,7 +80,17 @@ runs: - name: Run a custom Roswell Script shell: ros -Q -- {0} "$@" - run: ${{ inputs.custom-code }} + run: | + (progn + (ros:ensure-asdf) + #+quicklisp + (ql:quickload '() :silent t)) + + (defun main (args) + (declare (ignorable args)) + (format t "::group::Custom Roswell Script New~%") + ${{ inputs.custom-code }} + (format t "::endgroup::~%")) # - name: Test # shell: bash diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 89107b7..153200e 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -66,19 +66,10 @@ jobs: - uses: 40ants/cl-info/.github/actions/setup@custom-action with: custom-code: | - (progn - (ros:ensure-asdf) - #+quicklisp - (ql:quickload '() :silent t)) - - (defun main (args) - (declare (ignore args)) - (format t "::group::Custom Roswell Script~%") - (format t "Lisp: ~A ~A~%ASDF: ~A~%" - (lisp-implementation-version) - (lisp-implementation-type) - (asdf:asdf-version)) - (format t "::endgroup::~%")) + (format t "Lisp: ~A ~A~%ASDF: ~A~%" + (lisp-implementation-version) + (lisp-implementation-type) + (asdf:asdf-version)) # - name: Start SSH session # uses: luchihoratiu/debug-via-ssh@main From e2b4386049b3f7de5f327c7efe0788e8a539b389 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 19:45:39 +0300 Subject: [PATCH 029/117] Use default. --- .github/actions/setup/action.yml | 7 +++++-- .github/workflows/install.yml | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 6e92368..5452f86 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -88,8 +88,11 @@ runs: (defun main (args) (declare (ignorable args)) - (format t "::group::Custom Roswell Script New~%") - ${{ inputs.custom-code }} + (format t "::group::Custom Roswell Script New 2~%") + (let ((custom-code "${{ inputs.custom-code }}")) + (if (string= custom-code "") + (format t "No custom code~%") + (uiop:eval-input custom-code)) (format t "::endgroup::~%")) # - name: Test diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 153200e..5ce4604 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -64,12 +64,12 @@ jobs: steps: - uses: actions/checkout@v1 - uses: 40ants/cl-info/.github/actions/setup@custom-action - with: - custom-code: | - (format t "Lisp: ~A ~A~%ASDF: ~A~%" - (lisp-implementation-version) - (lisp-implementation-type) - (asdf:asdf-version)) + # with: + # custom-code: | + # (format t "Lisp: ~A ~A~%ASDF: ~A~%" + # (lisp-implementation-version) + # (lisp-implementation-type) + # (asdf:asdf-version)) # - name: Start SSH session # uses: luchihoratiu/debug-via-ssh@main From b856bed6b9776c36ff2693066a6fdb331c18596f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 19:51:57 +0300 Subject: [PATCH 030/117] Fixed errror. --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 5452f86..fc95a07 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -93,7 +93,7 @@ runs: (if (string= custom-code "") (format t "No custom code~%") (uiop:eval-input custom-code)) - (format t "::endgroup::~%")) + (format t "::endgroup::~%"))) # - name: Test # shell: bash From 83e300a0e9ae8138816946d2007b57c3de92823a Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 20:08:57 +0300 Subject: [PATCH 031/117] Now with custom code. --- .github/workflows/install.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 5ce4604..9f1a3b4 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -64,12 +64,12 @@ jobs: steps: - uses: actions/checkout@v1 - uses: 40ants/cl-info/.github/actions/setup@custom-action - # with: - # custom-code: | - # (format t "Lisp: ~A ~A~%ASDF: ~A~%" - # (lisp-implementation-version) - # (lisp-implementation-type) - # (asdf:asdf-version)) + with: + custom-code: | + (format t "Now with custom code!~%Lisp: ~A ~A~%ASDF: ~A~%" + (lisp-implementation-version) + (lisp-implementation-type) + (asdf:asdf-version)) # - name: Start SSH session # uses: luchihoratiu/debug-via-ssh@main From 02aac24c7fb3912921b5bc1ed83136a329941be4 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 20:12:43 +0300 Subject: [PATCH 032/117] Escape try. --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index fc95a07..8586ff9 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -89,7 +89,7 @@ runs: (defun main (args) (declare (ignorable args)) (format t "::group::Custom Roswell Script New 2~%") - (let ((custom-code "${{ inputs.custom-code }}")) + (let ((custom-code "${{ inputs.custom-code | escape }}")) (if (string= custom-code "") (format t "No custom code~%") (uiop:eval-input custom-code)) From 48784bff63ccb4040b2b476e4627c1f8ac99f594 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 2 Feb 2021 23:57:14 +0300 Subject: [PATCH 033/117] Custom tests runner. --- .github/actions/setup/action.yml | 32 ++++------- .github/actions/setup/run-tests.ros | 83 +++++++++++++++++++++++++++++ .github/workflows/install.yml | 6 +-- cl-info-test.asd | 19 ++++--- qlfile | 1 + qlfile.lock | 4 ++ t/core.lisp | 10 ++-- 7 files changed, 114 insertions(+), 41 deletions(-) create mode 100755 .github/actions/setup/run-tests.ros diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 8586ff9..f267a11 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,18 +5,14 @@ inputs: description: 'Jinja template for qlfile' required: false default: 'The Template' - lisp-system: + asdf-system: description: 'ASDF system to install and test' - required: false - default: '' + required: true run-tests: description: A command to run tests required: false - default: | - qlot exec ros --eval '(asdf:test-system :{{ lisp-system }})' --quit - - custom-code: - required: false + # default: | + # qlot exec ros --eval '(asdf:test-system :{{ lisp-system }})' --quit runs: @@ -78,22 +74,12 @@ runs: # (asdf:asdf-version)) # (format t "::endgroup::~%")) - - name: Run a custom Roswell Script - shell: ros -Q -- {0} "$@" + - name: Run Tests + shell: bash run: | - (progn - (ros:ensure-asdf) - #+quicklisp - (ql:quickload '() :silent t)) - - (defun main (args) - (declare (ignorable args)) - (format t "::group::Custom Roswell Script New 2~%") - (let ((custom-code "${{ inputs.custom-code | escape }}")) - (if (string= custom-code "") - (format t "No custom code~%") - (uiop:eval-input custom-code)) - (format t "::endgroup::~%"))) + ${{ github.action_path }}/run-tests.ros ${{ inputs.asdf-system }} < Date: Wed, 3 Feb 2021 00:01:55 +0300 Subject: [PATCH 034/117] Added Create Qlot Environment section. --- .github/actions/setup/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f267a11..01a0fe9 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -73,7 +73,12 @@ runs: # (lisp-implementation-type) # (asdf:asdf-version)) # (format t "::endgroup::~%")) - + - name: Create Qlot Environment + run: | + echo ::group::Create Qlot Environment + qlot install + echo ::endgroup:: + - name: Run Tests shell: bash run: | From 68bace89d485a3064676113c3d79949d429a5d4b Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 00:04:52 +0300 Subject: [PATCH 035/117] Added missing bash. --- .github/actions/setup/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 01a0fe9..4196b16 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -74,6 +74,7 @@ runs: # (asdf:asdf-version)) # (format t "::endgroup::~%")) - name: Create Qlot Environment + shell: bash run: | echo ::group::Create Qlot Environment qlot install From 28dba7abf2d31c5731b72df41e956ea57a8885e9 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 00:11:40 +0300 Subject: [PATCH 036/117] Fixed imports in tests. --- t/core.lisp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/t/core.lisp b/t/core.lisp index e7e6404..346c0bf 100644 --- a/t/core.lisp +++ b/t/core.lisp @@ -1,8 +1,12 @@ (defpackage #:cl-info-test/core - (:use #:cl - #:cl-info/core - #:rove - #:hamcrest/rove)) + (:use #:cl) + (:import-from #:cl-info) + (:import-from #:hamcrest/rove + #:contains + #:assert-that) + (:import-from #:rove + #:testing + #:deftest)) (in-package cl-info-test/core) From 9025888cdec45404cd59c10a828c5b36531e8871 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 00:20:06 +0300 Subject: [PATCH 037/117] Fixed dependency on hamcrest. --- cl-info-test.asd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cl-info-test.asd b/cl-info-test.asd index 1283878..12037fe 100644 --- a/cl-info-test.asd +++ b/cl-info-test.asd @@ -3,7 +3,8 @@ :license "" :class :package-inferred-system :pathname "t" - :depends-on ("cl-info-test/core") + :depends-on ("hamcrest" + "cl-info-test/core") :description "Test system for cl-info" :perform (test-op (op c) From be97026c301e25b73714dad839cdc2eb75873b00 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 00:33:30 +0300 Subject: [PATCH 038/117] Handle errors to process tests tail in all lisp implementations. --- .github/actions/setup/run-tests.ros | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup/run-tests.ros b/.github/actions/setup/run-tests.ros index 3117380..79b7ee8 100755 --- a/.github/actions/setup/run-tests.ros +++ b/.github/actions/setup/run-tests.ros @@ -5,8 +5,8 @@ exec ros -Q -- $0 "$@" |# (progn ;;init forms (ros:ensure-asdf) - #+quicklisp(ql:quickload '() :silent t) - ) + #+quicklisp(ql:quickload '(trivial-backtrace) + :silent t)) (defpackage :ros.script.run-tests (:use :cl)) @@ -56,13 +56,16 @@ exec ros -Q -- $0 "$@" "")) (unwind-protect - (progn + (handler-bind + ((error (lambda (condition) + (trivial-backtrace:print-backtrace condition) + (uiop:quit 3)))) (when (or (null system) (string= system "")) (format *error-output* "Please specify ASDF system as a first argument.~%") (uiop:quit 1)) - + (let* ((user-script (uiop/stream:slurp-stream-forms *standard-input*)) (result (cond From dc52cf4ccc719714db87611cf5496fc874b50d50 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 00:38:05 +0300 Subject: [PATCH 039/117] Checking how it will be without hamcrest. --- cl-info-test.asd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl-info-test.asd b/cl-info-test.asd index 12037fe..3d1d7a2 100644 --- a/cl-info-test.asd +++ b/cl-info-test.asd @@ -3,7 +3,7 @@ :license "" :class :package-inferred-system :pathname "t" - :depends-on ("hamcrest" + :depends-on (;; "hamcrest" "cl-info-test/core") :description "Test system for cl-info" From aecbbe4752a1bb786a654750205332977926c43a Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 00:51:13 +0300 Subject: [PATCH 040/117] Use debug 3. --- .github/actions/setup/run-tests.ros | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/setup/run-tests.ros b/.github/actions/setup/run-tests.ros index 79b7ee8..6fc6e20 100755 --- a/.github/actions/setup/run-tests.ros +++ b/.github/actions/setup/run-tests.ros @@ -8,6 +8,9 @@ exec ros -Q -- $0 "$@" #+quicklisp(ql:quickload '(trivial-backtrace) :silent t)) +(declaim (optimize (debug 3) (safety 3) + (speed 0) (space 0))) + (defpackage :ros.script.run-tests (:use :cl)) (in-package :ros.script.run-tests) From 9ab088ca775a7657e55b2dd17dcc3a4368b73256 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 01:08:36 +0300 Subject: [PATCH 041/117] Describe policy --- t/core.lisp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/core.lisp b/t/core.lisp index 346c0bf..d0d934f 100644 --- a/t/core.lisp +++ b/t/core.lisp @@ -11,6 +11,9 @@ (defun foo (a b) + #+sbcl + (sb-ext:describe-compiler-policy ) + (list a b 3)) From 1efee47d3ee61f05ed8bc35185fc89340b4cb14c Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 01:12:09 +0300 Subject: [PATCH 042/117] Returned asd. --- cl-info-test.asd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl-info-test.asd b/cl-info-test.asd index 3d1d7a2..12037fe 100644 --- a/cl-info-test.asd +++ b/cl-info-test.asd @@ -3,7 +3,7 @@ :license "" :class :package-inferred-system :pathname "t" - :depends-on (;; "hamcrest" + :depends-on ("hamcrest" "cl-info-test/core") :description "Test system for cl-info" From b879dc04828e0c871a2a4877c52a69d51de4a3b4 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 01:15:49 +0300 Subject: [PATCH 043/117] Removed declaim. --- .github/actions/setup/run-tests.ros | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/run-tests.ros b/.github/actions/setup/run-tests.ros index 6fc6e20..ab37c6f 100755 --- a/.github/actions/setup/run-tests.ros +++ b/.github/actions/setup/run-tests.ros @@ -8,8 +8,8 @@ exec ros -Q -- $0 "$@" #+quicklisp(ql:quickload '(trivial-backtrace) :silent t)) -(declaim (optimize (debug 3) (safety 3) - (speed 0) (space 0))) +;; (declaim (optimize (debug 3) (safety 3) +;; (speed 0) (space 0))) (defpackage :ros.script.run-tests (:use :cl)) From 54e4bf558ce3a57015368bacd95c9bd2e10fcbd5 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 01:29:22 +0300 Subject: [PATCH 044/117] Fixed test. --- .github/actions/setup/run-tests.ros | 4 ++-- t/core.lisp | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup/run-tests.ros b/.github/actions/setup/run-tests.ros index ab37c6f..6fc6e20 100755 --- a/.github/actions/setup/run-tests.ros +++ b/.github/actions/setup/run-tests.ros @@ -8,8 +8,8 @@ exec ros -Q -- $0 "$@" #+quicklisp(ql:quickload '(trivial-backtrace) :silent t)) -;; (declaim (optimize (debug 3) (safety 3) -;; (speed 0) (space 0))) +(declaim (optimize (debug 3) (safety 3) + (speed 0) (space 0))) (defpackage :ros.script.run-tests (:use :cl)) diff --git a/t/core.lisp b/t/core.lisp index d0d934f..58e4450 100644 --- a/t/core.lisp +++ b/t/core.lisp @@ -11,10 +11,7 @@ (defun foo (a b) - #+sbcl - (sb-ext:describe-compiler-policy ) - - (list a b 3)) + (list a b)) (deftest test-some-staff From 9f2f9adb3b7cbefe47554c5318ec884b28d2548a Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 01:33:37 +0300 Subject: [PATCH 045/117] Added section with CLI --- .github/workflows/install.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 7b3f46d..0cbefae 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -81,9 +81,9 @@ jobs: # fi # qlot exec ros install cl-info - # - name: Run Tests - # run: | - # set -x - # qlot exec cl-info --help - # qlot exec cl-info --version - # qlot exec cl-info cl-info + - name: Run Command Line Version + run: | + set -x + qlot exec cl-info --help + qlot exec cl-info --version + qlot exec cl-info cl-info From 3e43e468a8df1455f0842dd528bd4e35c8ec10c6 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 01:40:39 +0300 Subject: [PATCH 046/117] Added a step to do ros install. --- .github/actions/setup/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 4196b16..8935560 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -79,6 +79,16 @@ runs: echo ::group::Create Qlot Environment qlot install echo ::endgroup:: + + # This step will install system and + # all possible roswell scripts, if the system + # has them in the roswell/ subdirectory: + - name: Install ASDF System + shell: bash + run: | + echo ::group::Install ASDF System + qlot exec ros install ${{ inputs.asdf-system }} + echo ::endgroup:: - name: Run Tests shell: bash From ceeaec39413d4b16cacb274bebb4859d78076625 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 02:55:43 +0300 Subject: [PATCH 047/117] Trying to add qlfile template support. --- .github/actions/setup/action.yml | 34 ++++++++++------------------- .github/actions/setup/run-tests.ros | 2 +- .github/actions/setup/templater.ros | 24 ++++++++++++++++++-- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 8935560..8d47173 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,19 +1,15 @@ name: 'Install Roswell & Qlot' inputs: - qlfile-template: - description: 'Jinja template for qlfile' - required: false - default: 'The Template' asdf-system: description: 'ASDF system to install and test' required: true run-tests: description: A command to run tests required: false - # default: | - # qlot exec ros --eval '(asdf:test-system :{{ lisp-system }})' --quit - + qlfile-template: + description: 'Mustache template for qlfile' + required: false runs: using: composite @@ -57,28 +53,20 @@ runs: echo .qlot/bin >> $GITHUB_PATH echo ::endgroup:: - # - name: Run a custom Roswell Script - # shell: ros -Q -- {0} "$@" - # run: | - # (progn - # (ros:ensure-asdf) - # #+quicklisp - # (ql:quickload '() :silent t)) - - # (defun main (args) - # (declare (ignore args)) - # (format t "::group::Custom Roswell Script~%") - # (format t "Lisp: ~A ~A~%ASDF: ~A~%" - # (lisp-implementation-version) - # (lisp-implementation-type) - # (asdf:asdf-version)) - # (format t "::endgroup::~%")) - name: Create Qlot Environment shell: bash run: | echo ::group::Create Qlot Environment + + if [[ -n "${QLFILE_TEMPLATE}" ]]; then + echo "${QLFILE_TEMPLATE} | .github/actions/setup/templater.ros > qlfile + rm -f qlfile.lock + fi + qlot install echo ::endgroup:: + env: + QLFILE_TEMPLATE: ${{ qlfile-template }} # This step will install system and # all possible roswell scripts, if the system diff --git a/.github/actions/setup/run-tests.ros b/.github/actions/setup/run-tests.ros index 6fc6e20..ace09f7 100755 --- a/.github/actions/setup/run-tests.ros +++ b/.github/actions/setup/run-tests.ros @@ -69,7 +69,7 @@ exec ros -Q -- $0 "$@" "Please specify ASDF system as a first argument.~%") (uiop:quit 1)) - (let* ((user-script (uiop/stream:slurp-stream-forms *standard-input*)) + (let* ((user-script (uiop:slurp-stream-forms *standard-input*)) (result (cond (user-script diff --git a/.github/actions/setup/templater.ros b/.github/actions/setup/templater.ros index eba3734..37d46a0 100755 --- a/.github/actions/setup/templater.ros +++ b/.github/actions/setup/templater.ros @@ -6,7 +6,7 @@ exec ros -Q -- $0 "$@" (progn (ros:ensure-asdf) #+quicklisp - (ql:quickload '(cl-mustache) + (ql:quickload '(djula) :silent t)) (defpackage :ros.script.templater @@ -14,7 +14,27 @@ exec ros -Q -- $0 "$@" (in-package :ros.script.templater) +(defun collect-arguments () + (let* ((env-output (with-output-to-string (s) + (uiop:run-program "env" :output s))) + (lines (uiop:with-input (env-output) + (uiop:slurp-stream-lines env-output)))) + (loop for line in lines + for (key value) = (cl-ppcre:split "=" line + :limit 2) + appending (list (alexandria:make-keyword key) + value)))) + + (defun main (&rest argv) - (declare (ignorable argv))) + (declare (ignore argv)) + (let* ((lines (uiop:slurp-stream-lines *standard-input*)) + (template-text (apply #'concatenate 'string lines)) + (template (djula::compile-string template-text)) + (arguments (collect-arguments))) + (apply #'djula:render-template* + template + *standard-output* + arguments))) ;;; vim: set ft=lisp lisp: From 767ab926a0f521751c86caeb8e0da4f193630ca7 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 02:57:51 +0300 Subject: [PATCH 048/117] Fixed inputss. --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 8d47173..6a5037a 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -66,7 +66,7 @@ runs: qlot install echo ::endgroup:: env: - QLFILE_TEMPLATE: ${{ qlfile-template }} + QLFILE_TEMPLATE: ${{ inputs.qlfile-template }} # This step will install system and # all possible roswell scripts, if the system From c660b0c70520a1a89fe05902dc600cf15fd8a2af Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 03:00:36 +0300 Subject: [PATCH 049/117] Added missing quote. --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 6a5037a..19cbcf0 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -59,7 +59,7 @@ runs: echo ::group::Create Qlot Environment if [[ -n "${QLFILE_TEMPLATE}" ]]; then - echo "${QLFILE_TEMPLATE} | .github/actions/setup/templater.ros > qlfile + echo "${QLFILE_TEMPLATE}" | .github/actions/setup/templater.ros > qlfile rm -f qlfile.lock fi From 12accd902422544a1f2abad9a4edba8c3ce2e7ca Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 03:06:46 +0300 Subject: [PATCH 050/117] Added a qlfile template. --- .github/workflows/install.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 0cbefae..8393941 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -66,6 +66,10 @@ jobs: - uses: 40ants/cl-info/.github/actions/setup@custom-action with: asdf-system: cl-info + qlfile-template: | + {% ifequal quicklisp_dist "ultralisp" %} + dist ultralisp http://dist.ultralisp.org + {% endifequal %} # - name: Start SSH session # uses: luchihoratiu/debug-via-ssh@main From ec7bd54396f202b95f4cc19d9c6ba8a77f5aaaee Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 03:13:03 +0300 Subject: [PATCH 051/117] More groups. --- .github/workflows/install.yml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 8393941..073d558 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -71,23 +71,16 @@ jobs: dist ultralisp http://dist.ultralisp.org {% endifequal %} - # - name: Start SSH session - # uses: luchihoratiu/debug-via-ssh@main - # with: - # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} - # NGROK_REGION: eu - # SSH_PASS: ${{ secrets.SSH_PASS }} - - # - name: Install System - # run: | - # if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - # qlot exec ros install 40ants/defmain - # fi - - # qlot exec ros install cl-info - name: Run Command Line Version run: | - set -x + echo ::group::Help Argument qlot exec cl-info --help + echo ::endgroup:: + + echo ::group::Version Argument qlot exec cl-info --version - qlot exec cl-info cl-info + echo ::endgroup:: + + echo ::group::Lisp Systems Info + qlot exec cl-info cl-info defmain + echo ::endgroup:: From 9145e3b1f1b00b75a18a85d0b57ad296d40b1473 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 03:13:35 +0300 Subject: [PATCH 052/117] Enabled Ultralisp dist. --- .github/workflows/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 073d558..b4b575d 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -24,7 +24,7 @@ jobs: # - macos-latest quicklisp-dist: - quicklisp - # - ultralisp + - ultralisp lisp: - sbcl-bin - ccl-bin From 66f3745b336d5c3471c456e8eb5ea1430bdd8d48 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 03:30:25 +0300 Subject: [PATCH 053/117] Action and workflow were renamed. --- .github/actions/{setup => run-tests}/action.yml | 2 +- .github/actions/{setup => run-tests}/run-tests.ros | 0 .github/actions/{setup => run-tests}/templater.ros | 0 .github/workflows/{install.yml => ci.yml} | 10 ++++++---- 4 files changed, 7 insertions(+), 5 deletions(-) rename .github/actions/{setup => run-tests}/action.yml (97%) rename .github/actions/{setup => run-tests}/run-tests.ros (100%) rename .github/actions/{setup => run-tests}/templater.ros (100%) rename .github/workflows/{install.yml => ci.yml} (93%) diff --git a/.github/actions/setup/action.yml b/.github/actions/run-tests/action.yml similarity index 97% rename from .github/actions/setup/action.yml rename to .github/actions/run-tests/action.yml index 19cbcf0..8791d83 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/run-tests/action.yml @@ -59,7 +59,7 @@ runs: echo ::group::Create Qlot Environment if [[ -n "${QLFILE_TEMPLATE}" ]]; then - echo "${QLFILE_TEMPLATE}" | .github/actions/setup/templater.ros > qlfile + echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/templater.ros > qlfile rm -f qlfile.lock fi diff --git a/.github/actions/setup/run-tests.ros b/.github/actions/run-tests/run-tests.ros similarity index 100% rename from .github/actions/setup/run-tests.ros rename to .github/actions/run-tests/run-tests.ros diff --git a/.github/actions/setup/templater.ros b/.github/actions/run-tests/templater.ros similarity index 100% rename from .github/actions/setup/templater.ros rename to .github/actions/run-tests/templater.ros diff --git a/.github/workflows/install.yml b/.github/workflows/ci.yml similarity index 93% rename from .github/workflows/install.yml rename to .github/workflows/ci.yml index b4b575d..b031512 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: 'Check Installation' +name: 'CI' on: # This will run tests on pushes @@ -15,7 +15,7 @@ on: - cron: '0 10 * * 1' jobs: - run_tests: + run-tests: strategy: fail-fast: false matrix: @@ -63,14 +63,16 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: 40ants/cl-info/.github/actions/setup@custom-action + - uses: 40ants/cl-info/.github/actions/run-tests@custom-action with: asdf-system: cl-info qlfile-template: | {% ifequal quicklisp_dist "ultralisp" %} dist ultralisp http://dist.ultralisp.org {% endifequal %} - + + # This is additional step to check + # a command line script - name: Run Command Line Version run: | echo ::group::Help Argument From 397ab7e6c7e58d9a337f8a7e6c6566114c8a3d50 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 03:32:04 +0300 Subject: [PATCH 054/117] Enabled whole matrix. --- .github/workflows/ci.yml | 55 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b031512..282878a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,46 +16,45 @@ on: jobs: run-tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.can-fail || false }} + strategy: fail-fast: false matrix: os: - ubuntu-latest - # - macos-latest + - macos-latest quicklisp-dist: - quicklisp - ultralisp lisp: - sbcl-bin - ccl-bin - # - ecl - # - abcl - # - allegro - # - clisp - # - cmucl - # include: - # # Seems allegro is does not support 64bit OSX. - # # Unable to install it using Roswell: - # # alisp is not executable. Missing 32bit glibc? - # - lisp: allegro - # os: macos-latest - # can-fail: true - # # CLisp on Ubuntu can't be installed because of the error: - # # # does not have - # # the required size or alignment - # - lisp: clisp - # os: ubuntu-latest - # can-fail: true - # # CMUCL is 32bit and cant' work on 64bit OSX: - # # .roswell/impls/x86-64/darwin/cmu-bin/21d/bin/lisp is not executable. Missing 32bit glibc? - # - lisp: cmucl - # os: macos-latest - # can-fail: true + - ecl + - abcl + - allegro + - clisp + - cmucl + include: + # Seems allegro is does not support 64bit OSX. + # Unable to install it using Roswell: + # alisp is not executable. Missing 32bit glibc? + - lisp: allegro + os: macos-latest + can-fail: true + # CLisp on Ubuntu can't be installed because of the error: + # # does not have + # the required size or alignment + - lisp: clisp + os: ubuntu-latest + can-fail: true + # CMUCL is 32bit and cant' work on 64bit OSX: + # .roswell/impls/x86-64/darwin/cmu-bin/21d/bin/lisp is not executable. Missing 32bit glibc? + - lisp: cmucl + os: macos-latest + can-fail: true - - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.can-fail || false }} - env: LISP: ${{ matrix.lisp }} OS: ${{ matrix.os }} From 4883b8e9f8878797b423773fcde5ea1c29175f35 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 18:32:22 +0300 Subject: [PATCH 055/117] Use sbcl-bin in scripts. --- .github/actions/run-tests/run-tests.ros | 2 +- .github/actions/run-tests/templater.ros | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/run-tests/run-tests.ros b/.github/actions/run-tests/run-tests.ros index ace09f7..d1e91ab 100755 --- a/.github/actions/run-tests/run-tests.ros +++ b/.github/actions/run-tests/run-tests.ros @@ -1,7 +1,7 @@ #!/bin/sh #|-*- mode:lisp -*-|# #| -exec ros -Q -- $0 "$@" +exec ros -Q -L sbcl-bin -- $0 "$@" |# (progn ;;init forms (ros:ensure-asdf) diff --git a/.github/actions/run-tests/templater.ros b/.github/actions/run-tests/templater.ros index 37d46a0..731d706 100755 --- a/.github/actions/run-tests/templater.ros +++ b/.github/actions/run-tests/templater.ros @@ -1,7 +1,7 @@ #!/bin/sh #|-*- mode:lisp -*-|# #| -exec ros -Q -- $0 "$@" +exec ros -Q -L sbcl-bin -- $0 "$@" |# (progn (ros:ensure-asdf) From ab7083f49ef50dd43f566de375eb2bdd22f4bcfc Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 19:12:41 +0300 Subject: [PATCH 056/117] Removed unnecessary context. --- .github/actions/run-tests/action.yml | 36 ++-------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 8791d83..7f6d673 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -1,4 +1,4 @@ -name: 'Install Roswell & Qlot' +name: 'Test Common Lisp System' inputs: asdf-system: @@ -8,7 +8,7 @@ inputs: description: A command to run tests required: false qlfile-template: - description: 'Mustache template for qlfile' + description: "Djula template for qlfile. All environment variables are available in it's context" required: false runs: @@ -84,35 +84,3 @@ runs: ${{ github.action_path }}/run-tests.ros ${{ inputs.asdf-system }} < qlfile - # - name: Install Dependencies - # shell: bash - # run: | - # if [[ -e qlfile ]]; then - # rm -fr qlfile.lock - # else: - # if [[ "${QUICKLISP_DIST}" == 'ultralisp' ]]; then - # echo dist ultralisp http://dist.ultralisp.org/ >> qlfile - # fi - # fi - # qlot install - # - name: Install System - # shell: bash - # run: | - # if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - # qlot exec ros install 40ants/defmain - # fi - - # qlot exec ros install cl-info - # - name: Install System - # shell: bash - # run: | - # if [[ "${QUICKLISP_DIST}" == 'quicklisp' ]]; then - # qlot exec ros install 40ants/defmain - # fi - - # qlot exec ros install cl-info From cf4ba5cb7f30d6a710e4516e5d1dbdc19982659c Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Wed, 3 Feb 2021 22:26:14 +0300 Subject: [PATCH 057/117] Removed old docs. --- TEST.md | 8 - docs/Makefile | 153 ------------------ docs/requirements.in | 10 -- docs/requirements.txt | 30 ---- docs/source/_static/.keep | 0 docs/source/api.rst | 30 ---- docs/source/changelog.rst | 1 - docs/source/conf.py | 324 -------------------------------------- docs/source/index.rst | 40 ----- tasks.py | 42 ----- 10 files changed, 638 deletions(-) delete mode 100644 TEST.md delete mode 100644 docs/Makefile delete mode 100644 docs/requirements.in delete mode 100644 docs/requirements.txt delete mode 100644 docs/source/_static/.keep delete mode 100644 docs/source/api.rst delete mode 100644 docs/source/changelog.rst delete mode 100644 docs/source/conf.py delete mode 100644 docs/source/index.rst delete mode 100644 tasks.py diff --git a/TEST.md b/TEST.md deleted file mode 100644 index 8544ec4..0000000 --- a/TEST.md +++ /dev/null @@ -1,8 +0,0 @@ -Before iframe - - - -AFTER diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 332cc8b..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cl-info.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cl-info.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/cl-info" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cl-info" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/requirements.in b/docs/requirements.in deleted file mode 100644 index ebbb6a1..0000000 --- a/docs/requirements.in +++ /dev/null @@ -1,10 +0,0 @@ -# to build documentation -sphinx -pygments-cl-repl -sphinx-bootstrap-theme - -# to support docstring extraction and cross-referencing --e git+git@github.com:russell/sphinxcontrib-cldomain.git#egg=sphinxcontrib-cldomain - -# to run commands from tasks.py -invoke diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 06f074b..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,30 +0,0 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile --output-file requirements.txt requirements.in -# - --e git+git@github.com:russell/sphinxcontrib-cldomain.git#egg=sphinxcontrib-cldomain -alabaster==0.7.10 # via sphinx -appdirs==1.4.3 # via setuptools -babel==2.4.0 # via sphinx -docutils==0.13.1 # via sphinx -imagesize==0.7.1 # via sphinx -invoke==0.15.0 -Jinja2==2.9.6 # via sphinx -MarkupSafe==1.0 # via jinja2 -packaging==16.8 # via setuptools -pygments-cl-repl==0.1 -pygments==2.2.0 # via pygments-cl-repl, sphinx -pyparsing==2.2.0 # via packaging -pytz==2017.2 # via babel -requests==2.13.0 # via sphinx -six==1.10.0 # via packaging, setuptools, sphinx -snowballstemmer==1.2.1 # via sphinx -sphinx-bootstrap-theme==0.4.14 -sphinx==1.5.5 - -# The following packages are commented out because they are -# considered to be unsafe in a requirements file: -# setuptools # via sphinx-bootstrap-theme diff --git a/docs/source/_static/.keep b/docs/source/_static/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/docs/source/api.rst b/docs/source/api.rst deleted file mode 100644 index ceeb5a2..0000000 --- a/docs/source/api.rst +++ /dev/null @@ -1,30 +0,0 @@ -===== - API -===== - -Here you can describe an API. - -Use `cldomain's `_ directives, to insert -functions or macroses descriptions, like that: - -.. cl:package:: cl-info - -.. cl:function:: foo - -.. cl:macro:: bar - - Also you can specify additional examples for some blocks: - - .. code-block:: common-lisp-repl - - TEST> (bar 1 2 3) - - (1 2 3) - NIL - -And because this is Sphinx, you can use it's great cross-referencing -features to link to functions. Here is the link to -:cl:function:`cl-info:foo`. - -Read the documentation on `cldomain `_ and -write your own beautiful docs! diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst deleted file mode 100644 index 705b295..0000000 --- a/docs/source/changelog.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../ChangeLog.rst diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index e94b28f..0000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,324 +0,0 @@ -# -*- coding: utf-8 -*- -# -# cl-info documentation build configuration file, created by -# sphinx-quickstart on Sat Apr 8 20:18:20 2017. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys, os - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = [ - # 'sphinx.ext.autodoc', - # 'sphinx.ext.doctest', - # 'sphinx.ext.viewcode', - # 'sphinx.ext.intersphinx', - - # creates .nojekyll file on generated HTML directory - 'sphinx.ext.githubpages', - # Allow reference sections using its title - # http://www.sphinx-doc.org/en/stable/ext/autosectionlabel.html - 'sphinx.ext.autosectionlabel', - 'sphinxcontrib.cldomain', - 'sphinxcontrib.hyperspec', -] - -from os.path import join, dirname, realpath, expandvars -cl_systems = [ - { - 'name': 'cl-info-test', - 'path': join(dirname(realpath(__file__)), '../../'), - 'packages': [ - 'cl-info', - ] - }, -] - -cl_quicklisp = expandvars('$HOME/quicklisp/') - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'cl-info' -copyright = u'2017, ' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The full version, including alpha/beta/rc tags. -release = open(join(dirname(__file__), "../..", - "version.lisp-expr")).read().strip().strip('"') -# The short X.Y version. -version = '.'.join(release.split('.')[:2]) - - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -highlight_language = 'common-lisp' -pygments_style = 'emacs' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -import sphinx_bootstrap_theme -html_theme = 'bootstrap' - -# почему-то в модуле его нет -#html_translator_class = 'sphinx_bootstrap_theme.BootstrapTranslator' - -html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() - -html_theme_options = { - # Navigation bar title. (Default: ``project`` value) - # 'navbar_title': "Demo", - - 'navbar_sidebarrel': False, - - 'navbar_pagenav': False, - - # Tab name for entire site. (Default: "Site") - "navbar_site_name": "Contents", - - # Global TOC depth for "site" navbar tab. (Default: 1) - # Switching to -1 shows all levels. - # 'globaltoc_depth': 2, - - # Include hidden TOCs in Site navbar? - # - # Note: If this is "false", you cannot have mixed ``:hidden:`` and - # non-hidden ``toctree`` directives in the same page, or else the build - # will break. - # - # Values: "true" (default) or "false" - # 'globaltoc_includehidden': "true", - - # HTML navbar class (Default: "navbar") to attach to
element. - # For black navbar, do "navbar navbar-inverse" - # 'navbar_class': "navbar navbar-inverse", - 'navbar_site_name': "Documentation", - - 'navbar_links': [("Changelog", "changelog")], - - # Fix navigation bar to top of page? - # Values: "true" (default) or "false" - # 'navbar_fixed_top': "true", - - # Location of link to source. - # Options are "nav" (default), "footer" or anything else to exclude. - 'source_link_position': "footer", - - # Bootswatch (http://bootswatch.com/) theme. - # - # Options are nothing with "" (default) or the name of a valid theme - # such as "amelia" or "cosmo". - # - # Note that this is served off CDN, so won't be available offline. - 'bootswatch_theme': "yeti", -} - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = ["_themes/"] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} -html_sidebars = {'**': ['localtoc.html'], - 'search': None, - 'glossary': None} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'cl-infodoc' - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'cl-info.tex', u'cl-info Documentation', - u'', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'cl-info', u'cl-info Documentation', - [u''], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'cl-info', u'cl-info Documentation', - u'', 'cl-info', '', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index e7865df..0000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,40 +0,0 @@ -========================================= - Welcome to cl-info's documentation! -========================================= - -This is an implementation of Hamcrest for Common Lisp. - -Here are some examples ----------------------- - - -.. code-block:: common-lisp-repl - - GIT> (assert-that - log-item - (has-plist-entries :|@message| "Some" - :|@timestamp| _) - (hasnt-plist-keys :|@fields|)) - -.. include:: ../../README.rst - :start-after: include-from - :end-before: include-to - -Contents -======== - -.. toctree:: - :maxdepth: 2 - - api - changelog - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - - diff --git a/tasks.py b/tasks.py deleted file mode 100644 index 7ddd766..0000000 --- a/tasks.py +++ /dev/null @@ -1,42 +0,0 @@ -import os -import sys - -from invoke import task, run - - -@task -def build_docs(ctx): - """Builds html documentation and updates gh-pages branch. - """ - def git(cmd): - return run('cd docs/build/html && git {0}'.format(cmd)) - - # build docs - run('cd docs && make html') - - # If project's directory is git repository - if os.path.exists('.git'): - # if no git repository in docs/build/html, - # then init one - if not os.path.exists('docs/build/html/.git'): - result = run("git remote -v | grep '^origin.*(push)$'", warn=True) - - if result.failed: - print('There is no "origin" remote in this git repository.') - print('Please, add remote and push it to the Github.') - sys.exit(1) - else: - origin = result.stdout.strip().split()[1] - git('init') - git('remote add origin {0}'.format(origin)) - - git('add .') - git('commit -m "Update docs"') - git('push --force origin master:gh-pages') - else: - # If project's directory is not a repository - # then we don't know where to push the docs. - print('This project is not a git repository.') - print('Please, push it to the GitHub and run this command') - print('again. Then we\'ll be able to update gh-pages branch.') - sys.exit(1) From 76531033483c79ea00f5d877c0962209e2e0d7db Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 12:41:50 +0300 Subject: [PATCH 058/117] Added actions to build docs. --- .github/actions/build-docs/action.yml | 20 +++ .github/actions/setup-lisp/action.yml | 76 ++++++++++++ .github/workflows/docs.yml | 28 +++++ cl-info-docs.asd | 6 + docs/scripts/build.ros | 163 +++++++++++++++++++++++++ docs/source/docs.lisp | 168 ++++++++++++++++++++++++++ src/core.lisp | 112 ++++++++++++++--- 7 files changed, 555 insertions(+), 18 deletions(-) create mode 100644 .github/actions/build-docs/action.yml create mode 100644 .github/actions/setup-lisp/action.yml create mode 100644 .github/workflows/docs.yml create mode 100644 cl-info-docs.asd create mode 100755 docs/scripts/build.ros create mode 100644 docs/source/docs.lisp diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml new file mode 100644 index 0000000..9688ab4 --- /dev/null +++ b/.github/actions/build-docs/action.yml @@ -0,0 +1,20 @@ +name: 'Build Docs' + +inputs: + asdf-system: + description: 'ASDF system to build system for' + required: true + qlfile-template: + description: "Djula template for qlfile. All environment variables are available in it's context" + required: false + +runs: + using: composite + steps: + - uses: 40ants/cl-info/.github/actions/setup-lisp@custom-action + with: + asdf-system: cl-info + - name: Finish + shell: bash + run: | + echo "DONE" diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml new file mode 100644 index 0000000..44bade2 --- /dev/null +++ b/.github/actions/setup-lisp/action.yml @@ -0,0 +1,76 @@ +name: 'Setup Common Lisp' + +inputs: + asdf-system: + description: 'ASDF system to install' + required: true + qlfile-template: + description: "Djula template for qlfile. All environment variables are available in it's context" + required: false + +runs: + using: composite + steps: + - name: Current Env + shell: bash + run: | + echo ::group::Environment + echo "Current dir:" + pwd + + echo "Environment Variables:" + env | sort -u + echo ::endgroup:: + - name: Install Roswell + shell: bash + run: | + echo ::group::Install Roswell + if [[ "$OS" == "ubuntu-latest" ]]; then + sudo apt-get -y install git build-essential automake libcurl4-openssl-dev + fi + if [[ "$OS" == "macos-latest" ]]; then + brew install automake autoconf curl + fi + + curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh + + echo $HOME/.roswell/bin >> $GITHUB_PATH + echo ::endgroup:: + - name: Upgrade ASDF to the Latest Version + shell: bash + run: | + echo ::group::Upgrade ASDF + ros install asdf + echo ::endgroup:: + - name: Install Qlot + shell: bash + run: | + echo ::group::Install Qlot + ros install qlot + echo .qlot/bin >> $GITHUB_PATH + echo ::endgroup:: + + - name: Create Qlot Environment + shell: bash + run: | + echo ::group::Create Qlot Environment + + if [[ -n "${QLFILE_TEMPLATE}" ]]; then + echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/templater.ros > qlfile + rm -f qlfile.lock + fi + + qlot install + echo ::endgroup:: + env: + QLFILE_TEMPLATE: ${{ inputs.qlfile-template }} + + # This step will install system and + # all possible roswell scripts, if the system + # has them in the roswell/ subdirectory: + - name: Install ASDF System + shell: bash + run: | + echo ::group::Install ASDF System + qlot exec ros install ${{ inputs.asdf-system }} + echo ::endgroup:: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..db0f14f --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,28 @@ +name: 'Docs' + +on: + # This will run tests on pushes + # to master branch or on pull merges: + push: + branches: + - 'main' + - 'master' + # This will run tests for every pull request: + pull_request: + # Rerun tests at 10 AM every Monday + # to check if they still work with latest dependencies. + schedule: + - cron: '0 10 * * 1' + +jobs: + build-docs: + runs-on: ubuntu-latest + + env: + LISP: sbcl-bin + + steps: + - uses: actions/checkout@v1 + - uses: 40ants/cl-info/.github/actions/build-docs@custom-action + with: + asdf-system: cl-info diff --git a/cl-info-docs.asd b/cl-info-docs.asd new file mode 100644 index 0000000..57befb9 --- /dev/null +++ b/cl-info-docs.asd @@ -0,0 +1,6 @@ +(defsystem example-docs + :build-operation build-docs-op + :build-pathname "docs/build/" + :class :package-inferred-system + :pathname "docs/source/" + :depends-on ("example-docs/docs")) diff --git a/docs/scripts/build.ros b/docs/scripts/build.ros new file mode 100755 index 0000000..fb1df80 --- /dev/null +++ b/docs/scripts/build.ros @@ -0,0 +1,163 @@ +#!/bin/sh +#|-*- mode:lisp -*-|# +#| +exec ros -Q -- $0 "$@" +|# +(progn ;;init forms + (ros:ensure-asdf) + #+quicklisp + (ql:quickload '(log4cl + example-docs) + :silent t)) + +(defpackage :script.build-docs + (:use :cl)) +(in-package :script.build-docs) + + +(define-condition unable-to-proceed (simple-error) + ((message :initarg :message + :reader get-message)) + (:report (lambda (condition stream) + (format stream (get-message condition))))) + + +(define-condition subprocess-error-with-output (uiop::subprocess-error) + ((stdout :initarg :stdout :reader subprocess-error-stdout) + (stderr :initarg :stderr :reader subprocess-error-stderr)) + (:report (lambda (condition stream) + (format stream "Subprocess ~@[~S~% ~]~@[with command ~S~% ~]exited with error~@[ code ~D ~]~@[ and this text at stderr:~% ~S~]" + (uiop:subprocess-error-process condition) + (uiop:subprocess-error-command condition) + (uiop:subprocess-error-code condition) + (subprocess-error-stderr condition)) + ))) + +(defun run (command &key (raise t)) + "Runs command and returns it's stdout stderr and code. + +If there was an error, raises subprocess-error-with-output, but this +behaviour could be overriden by keyword argument ``:raise t``." + + (multiple-value-bind (stdout stderr code) + (uiop:run-program command + :output '(:string :stripped t) + :error-output '(:string :stripped t) + :ignore-error-status t) + + (when (and raise + (not (eql code 0))) + (error 'subprocess-error-with-output + :stdout stdout + :stderr stderr + :code code + :command command)) + (values stdout stderr code))) + + +(defun build-docs () + (log:info "Building documentation in ./docs/") + + (example-docs:build-docs) + + (uiop:with-output-file (s "docs/build/.nojekyll" :if-exists :overwrite) + (declare (ignorable s)))) + + +(defun gh-pages-repository-initialized-p () + "Checks if repository for documentation already initialized" + (uiop:directory-exists-p "docs/build/.git")) + + +(defun git (&rest commands) + "Calls git command in gh-pages repository." + + (let ((directory "docs/build/")) + (uiop:with-current-directory (directory) + (let ((command (apply #'concatenate 'string + "git " + commands))) + + (log:info "Running" command "in" directory) + (run command))))) + + +(defun git-repository-was-changed-p () + ;; if git status returns something, then repository have uncommitted changes + (> (length (git "status --porcelain")) + 0)) + + +(defun get-git-upstream () + ;; taken from http://stackoverflow.com/a/9753364/70293 + (let ((upstream (run "git rev-parse --abbrev-ref --symbolic-full-name @{u}" :raise nil))) + (when (> (length upstream) + 0) + (subseq upstream + 0 + (search "/" upstream))))) + + +(defun get-origin-to-push () + (let ((upstream (get-git-upstream))) + + (cond + (upstream + ;; If there is already some remote upstream, then use it + (run (concatenate 'string "git remote get-url " upstream))) + ;; If we are running inside github actions + ((uiop:getenv "GITHUB_ACTIONS") + (unless (uiop:getenv "GITHUB_TOKEN") + (error 'unable-to-proceed + :message "Please, provide GITHUB_TOKEN environment variable.")) + (format nil "https://~A:~A@github.com/~A" + (uiop:getenv "GITHUB_ACTOR") + (uiop:getenv "GITHUB_TOKEN") + (uiop:getenv "GITHUB_REPOSITORY"))) + ;; otherwise make it from travis secret token and repo slug + (t + (let ((repo-slug (uiop:getenv "TRAVIS_REPO_SLUG")) + (repo-token (uiop:getenv "GH_REPO_TOKEN"))) + + (unless (and repo-slug repo-token) + (error 'unable-to-proceed + :message "Current branch does not track any upstream and there is no TRAVIS_REPO_SLUG and GH_REPO_TOKEN env variables. Where to push gh-pages branch?")) + + (format nil "https://~A@github.com/~A" + repo-token + repo-slug)))))) + + +(defun push-gh-pages () + (log:info "Pushing changes to gh-pages branch") + + (unless (gh-pages-repository-initialized-p) + (git "init") + + (git "remote add origin " + (get-origin-to-push))) + + (git "add .") + + (cond + ((git-repository-was-changed-p) + (when (uiop:getenv "GITHUB_ACTIONS") + (git "config --global user.name \"github-actions[bot]\"") + (git "config --global user.email \"actions@github.com\"")) + (git "commit -m 'Update docs'") + + (git "push --force origin master:gh-pages")) + ;; or + (t (log:info "Everything is up to date.")))) + + +(defun main (&rest argv) + (declare (ignorable argv)) + (log:config :debug) + (log:info "Building documentation") + + (handler-bind ((error (lambda (condition) + (uiop:print-condition-backtrace condition :stream *error-output*) + (uiop:quit 1)))) + (build-docs) + (push-gh-pages))) diff --git a/docs/source/docs.lisp b/docs/source/docs.lisp new file mode 100644 index 0000000..907f889 --- /dev/null +++ b/docs/source/docs.lisp @@ -0,0 +1,168 @@ +(defpackage #:example-docs/docs + (:nicknames #:example-docs) + (:use #:cl) + (:import-from #:mgl-pax + #:section + #:defsection) + (:import-from #:example/app + #:@app) + (:import-from #:example/utils + #:@utils) + (:export + #:build-docs)) +(in-package example-docs/docs) + + +(defsection @index (:title "Example of MGL-PAX Common Lisp Documentation Builder") + " +This is small library includes a few functions with docstrings and a documentation +for the system and all included packages. + +The purpose is to demonstrate core features of the +[MGL-PAX](http://melisgl.github.io/mgl-pax/) documentation builder. + +This repository is part of the organization, +created to compare different Common Lisp documentation systems. + +The goal is make it easier for CL software developers to choose proper +documentation system and to improve docs in their software! + +Resulting documentation can be viewed here: + + + +The repository can be used as a template for new libraries if you've choosen `MGL-PAX` +for documenting your library. + +Let's review features, provided by `MGL-PAX`. + +" + (@pros-n-cons section) + (@how-to-build section) + (@handwritten section) + (@autogenerated section) + (@packages section)) + + +(defsection @pros-n-cons (:title "Pros & Cons of PAX") + (@pros section) + (@cons section)) + + +(defsection @pros (:title "Pros") + " +* Markdown is widely used markup format and PAX uses it everywhere. +* Cross-referencing works like a charm and you can reference different + types of objects using [Locatives](http://melisgl.github.io/mgl-pax/#x-28MGL-PAX-3A-40MGL-PAX-LOCATIVES-AND-REFERENCES-20MGL-PAX-3ASECTION-29). +* New types of documentation objects can be defined in Common Lisp using CLOS. + Here is [an example](http://melisgl.github.io/mgl-pax/#x-28MGL-PAX-3AREFERENCE-LOCATIVE-20-28MGL-PAX-3AREADER-20MGL-PAX-3AREFERENCE-29-29). +* Emacs/SLIME integration and ability to jump to a xref objects using M-. +* Ability to generate Markdown README files as well as HTML. +* It is possible to link documentation and sources on the GitHub. +* Docstrings deindentation allows to format code nicely. +* You can generation docs for a multiple ASDF systems with cross-referencing. +* Autoexports all documented symbols. No need to enumerate them in `defpackage` form. +* There is a nice default HTML theme. +* No external tools like Sphinx. Everything is in Common Lisp. +") + + +(defsection @cons (:title "Cons") + " +* Markdown format may be somewhat limited and probably it can be non-trivial or not possible + to extend it in some rare cases. +* The recommended way to mix documentation section with code leads to + the runtime dependency from PAX and all it's dependencies. But you + might define documentation as a separate ASDF system. +* PAX does not notifies you if some references are missing or there are unused sections. + These mistakes can be catched automatically. +* It is inconvenient to write Markdown in docstrings. Is there any way + to teach Emacs to use markdown minor mode for documentation strings? +* There is no magically autogenerated reference API. See @AUTOGENERATED. + + But if you prefer another way, it should be easy to write a function which + will collect external symbols and generate a MGL-PAX:SECTION object for them. +") + + +(defsection @how-to-build (:title "How to build the documentation") + " +MGL-PAX has a number of ways for generation of the docs. But most probably, +you'll need only toplevel helpers described in it's section +[Generating Documentation](http://melisgl.github.io/mgl-pax/#toc-7-generating-documentation). + +These helpers is able to generate README and HTML docs for an ASDF system. + +This example defines it's own wrapper EXAMPLE-DOCS:BUILD-DOCS: +" + (build-docs function) + + " +It is as simple, as: + + +``` +(defun build-docs () + (mgl-pax:update-asdf-system-readmes @index :example) + + (mgl-pax:update-asdf-system-html-docs @index :example + :target-dir \"docs/build/\")) +``` + +This function is used by docs/scripts/build.ros file to generate documentation from GitHub Actions. +Or can be called from the REPL. +") + + +(defsection @handwritten (:title "Handwritten Documentation") + " +I think the ability to write a large pieces of documentation which aren't bound to +a function, class or module is an important feature. This way you can tell the user +about some toplevel abstractions and give a bird eye view on the library or system. + +For example, handwritten parts of the documentation can provide some code snippets +to demonstrate the ways, how to use the library: + +``` +(loop repeat 42 + collect (foo \"bar\" 100500)) +``` + +And when you are talking about some function or class, you can reference it. +For example, if I'm talking about the FOO function, I can reference it like this +`[example/app:foo][function]` and it will appear in the code as +the link [example/app:foo]. In most cases you can omit square brakets and just +capitalize symbol name. + +Comparing MGL-PAX to Coo (here is it's [example project](https://cl-doc-systems.github.io/coo/), +I'd prefer the PAX, because it's ability to mix handwriten sections with documentation extracted +from docstrings. + +") + + +(defsection @autogenerated (:title "Autogenerated API Reference") + " +There is no magically autogenerated reference API. Idea of PAX is that you +write docs manually and reference documented symbols. They are automatically +exported and this way you library's external API should be documented. + +But if you prefer another way, it should be easy to write a function which +will collect external symbols and generate a MGL-PAX:SECTION object for them. +") + +(defsection @packages (:title "Packages") + (@app section) + (@utils section)) + + +(defun build-docs () + (mgl-pax:update-asdf-system-readmes @index :example) + + (mgl-pax:update-asdf-system-html-docs + @index :example + :target-dir "docs/build/" + :pages `((:objects (,example-docs:@index) + :source-uri-fn ,(pax:make-github-source-uri-fn + :example + "https://github.com/cl-doc-systems/mgl-pax"))))) diff --git a/src/core.lisp b/src/core.lisp index 1dc254c..6cf43e0 100644 --- a/src/core.lisp +++ b/src/core.lisp @@ -1,27 +1,103 @@ -(defpackage #:cl-info/core - (:nicknames #:cl-info) +(defpackage #:cl-info + (:nicknames #:cl-info/core) (:use #:cl) - (:export - #:cl-info - #:get-asdf-version - #:get-lisp-type - #:get-lisp-version - #:get-software-type - #:get-software-version - #:get-ql-dists - #:get-cl-info - #:system-info - #:get-name - #:get-version - #:get-path - #:absent-p - #:get-system-info)) + (:import-from #:mgl-pax-minimal + #:defsection + #:reader) + (:export #:cl-info + #:get-cl-info + #:get-system-info)) (in-package cl-info/core) +(defsection @index (:title "CL-INFO - Common Lisp Environment Reporter") + " +[![](https://github-actions.40ants.com/40ants/cl-info/matrix.svg)](https://github.com/40ants/cl-info/actions) + +This is a small utility, useful to display information about you Common +Lisp environment. You might want to call it in the CI pipeline or +to use it when rendering a crash report in some client applications. + +Usage from Common Lisp +====================== + +It's main entry point is CL-INFO:GET-CL-INFO function. It returns an object with +customized PRINT-OBJECT method. You can use it to output debug +information in your programs. + +CL-INFO collects inforrmation about OS, Lisp Implementation, ASDF, installed +Quicklisp distributions: + + CL-USER> (cl-info:get-cl-info) + OS: Darwin 15.6.0 + Lisp: SBCL 1.4.8 + ASDF: 3.3.1.1 + QL: ceramic github-e0d905187946f8f2358f7b05e1ce87b302e34312 + cl-prevalence github-c163c227ed85d430b82cb1e3502f72d4f88e3cfa + log4cl-json github-c4f786e252d89a45372186aaf32fb8e8736b444b + log4cl github-6a857b0b41c030a8a3b04096205e221baaa1755f + quicklisp 2018-04-30 + slynk github-3314cf8c3021cb758e0e30fe3ece54accf1dcf3d + weblocks-lass github-1b043afbf2f3e84e495dfeae5e63fe67a435019f + weblocks-parenscript github-8ef4ca2f837403a05c4e9b92dcf1c41771d16f17 + weblocks-ui github-5afdf238534d70edc2447d0bc8bc63da8e35999f + weblocks-websocket github-b098db7f179dce3bfb045afd4e35e7cc868893f0 + weblocks github-282483f97d6ca351265ebfebb017867c295d01ad + websocket-driver github-a3046b11dfb9803ac3bff7734dd017390c2b54bb + CL-USER> + +Also, you can gather information about separate systems using CL-INFO:GET-SYSTEM-INFO +function: + + CL-USER> (cl-info:get-system-info :hamcrest) + System: HAMCREST 0.4.2 + /Users/art/common-lisp/cl-hamcrest/src/ + + +Usage From Command-line +======================= + +Also, you can use CL-INFO as a command-line utility. It is useful to +output information about common lisp environment running on CI server. + +Here is how to do it: + +```shell +# Here we use a Roswell, to install utility +[art@art-osx:~]% ros install 40ants/cl-info + +# And now request information about lisp and some systems +[art@art-osx:~]% cl-info weblocks clack jonathan some-other-system +OS: Darwin 15.6.0 +Lisp: Clozure Common Lisp Version 1.11.5/v1.11.5 (DarwinX8664) +ASDF: 3.3.1.1 +QL: org.borodust.bodge 20180214223017 + quicklisp 2017-10-23 +System: weblocks 0.31.1 + /Users/art/common-lisp/weblocks/src/ +System: clack 2.0.0 + /Users/art/common-lisp/clack/ +System: jonathan 0.1 + /Users/art/.roswell/lisp/quicklisp/dists/quicklisp/software/jonathan-20170630-git/ +System: some-other-system is not available +``` + +API Reference +============= +" + (get-cl-info function) + (get-system-info function) + + (cl-info class) + (get-asdf-version (reader cl-info)) + + (system-info class)) + + (defclass cl-info () ((asdf-version :initform (asdf:asdf-version) - :reader get-asdf-version) + :reader get-asdf-version + :documentation "Returns ASDF version.") (lisp-type :initform (lisp-implementation-type) :reader get-lisp-type) (lisp-version :initform (lisp-implementation-version) From f08488bad6e654289ab0b1389b8fb0f1e9f01eb7 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 12:50:29 +0300 Subject: [PATCH 059/117] Trying only small part. --- .github/actions/build-docs/action.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 9688ab4..407b1ff 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -14,7 +14,3 @@ runs: - uses: 40ants/cl-info/.github/actions/setup-lisp@custom-action with: asdf-system: cl-info - - name: Finish - shell: bash - run: | - echo "DONE" From ed1d6fe328629daf12879d17843b4d1fe7bf315d Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 12:51:00 +0300 Subject: [PATCH 060/117] Smaller matrix. --- .github/workflows/ci.yml | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 282878a..5c5be53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,36 +24,36 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest +# - macos-latest quicklisp-dist: - quicklisp - - ultralisp +# - ultralisp lisp: - sbcl-bin - - ccl-bin - - ecl - - abcl - - allegro - - clisp - - cmucl - include: - # Seems allegro is does not support 64bit OSX. - # Unable to install it using Roswell: - # alisp is not executable. Missing 32bit glibc? - - lisp: allegro - os: macos-latest - can-fail: true - # CLisp on Ubuntu can't be installed because of the error: - # # does not have - # the required size or alignment - - lisp: clisp - os: ubuntu-latest - can-fail: true - # CMUCL is 32bit and cant' work on 64bit OSX: - # .roswell/impls/x86-64/darwin/cmu-bin/21d/bin/lisp is not executable. Missing 32bit glibc? - - lisp: cmucl - os: macos-latest - can-fail: true + # - ccl-bin + # - ecl + # - abcl + # - allegro + # - clisp + # - cmucl + # include: + # # Seems allegro is does not support 64bit OSX. + # # Unable to install it using Roswell: + # # alisp is not executable. Missing 32bit glibc? + # - lisp: allegro + # os: macos-latest + # can-fail: true + # # CLisp on Ubuntu can't be installed because of the error: + # # # does not have + # # the required size or alignment + # - lisp: clisp + # os: ubuntu-latest + # can-fail: true + # # CMUCL is 32bit and cant' work on 64bit OSX: + # # .roswell/impls/x86-64/darwin/cmu-bin/21d/bin/lisp is not executable. Missing 32bit glibc? + # - lisp: cmucl + # os: macos-latest + # can-fail: true env: LISP: ${{ matrix.lisp }} From 4afcec2ee84530c02d2897aa190a75a39c63ebfe Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 12:55:24 +0300 Subject: [PATCH 061/117] Make actions modular. --- .github/actions/run-tests/action.yml | 67 --------------------------- .github/actions/setup-lisp/action.yml | 3 +- .github/workflows/ci.yml | 8 ++++ 3 files changed, 10 insertions(+), 68 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 7f6d673..31ecb96 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -7,77 +7,10 @@ inputs: run-tests: description: A command to run tests required: false - qlfile-template: - description: "Djula template for qlfile. All environment variables are available in it's context" - required: false runs: using: composite steps: - - name: Current Env - shell: bash - run: | - echo ::group::Environment - echo "Current dir:" - pwd - - echo "Environment Variables:" - env | sort -u - echo ::endgroup:: - - name: Install Roswell - shell: bash - run: | - echo ::group::Install Roswell - if [[ "$OS" == "ubuntu-latest" ]]; then - sudo apt-get -y install git build-essential automake libcurl4-openssl-dev - fi - if [[ "$OS" == "macos-latest" ]]; then - brew install automake autoconf curl - fi - - curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh - - echo $HOME/.roswell/bin >> $GITHUB_PATH - echo ::endgroup:: - - name: Upgrade ASDF to the Latest Version - shell: bash - run: | - echo ::group::Upgrade ASDF - ros install asdf - echo ::endgroup:: - - name: Install Qlot - shell: bash - run: | - echo ::group::Install Qlot - ros install qlot - echo .qlot/bin >> $GITHUB_PATH - echo ::endgroup:: - - - name: Create Qlot Environment - shell: bash - run: | - echo ::group::Create Qlot Environment - - if [[ -n "${QLFILE_TEMPLATE}" ]]; then - echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/templater.ros > qlfile - rm -f qlfile.lock - fi - - qlot install - echo ::endgroup:: - env: - QLFILE_TEMPLATE: ${{ inputs.qlfile-template }} - - # This step will install system and - # all possible roswell scripts, if the system - # has them in the roswell/ subdirectory: - - name: Install ASDF System - shell: bash - run: | - echo ::group::Install ASDF System - qlot exec ros install ${{ inputs.asdf-system }} - echo ::endgroup:: - - name: Run Tests shell: bash run: | diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 44bade2..fff4525 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -3,7 +3,7 @@ name: 'Setup Common Lisp' inputs: asdf-system: description: 'ASDF system to install' - required: true + required: false qlfile-template: description: "Djula template for qlfile. All environment variables are available in it's context" required: false @@ -74,3 +74,4 @@ runs: echo ::group::Install ASDF System qlot exec ros install ${{ inputs.asdf-system }} echo ::endgroup:: + if: ${{ inputs.asdf-system }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c5be53..1ae706f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,13 @@ jobs: steps: - uses: actions/checkout@v1 + - uses: 40ants/cl-info/.github/actions/setup-lisp@custom-action + with: + asdf-system: cl-info + qlfile-template: | + {% ifequal quicklisp_dist "ultralisp" %} + dist ultralisp http://dist.ultralisp.org + {% endifequal %} - uses: 40ants/cl-info/.github/actions/run-tests@custom-action with: asdf-system: cl-info @@ -70,6 +77,7 @@ jobs: dist ultralisp http://dist.ultralisp.org {% endifequal %} + # This is additional step to check # a command line script - name: Run Command Line Version From 6e528369a4af1285ba1839312b8ae5904114f36e Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 12:59:05 +0300 Subject: [PATCH 062/117] Updated docs builder yaml. --- .github/actions/build-docs/action.yml | 14 +++++++++++--- .github/workflows/docs.yml | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 407b1ff..c9dcab8 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -11,6 +11,14 @@ inputs: runs: using: composite steps: - - uses: 40ants/cl-info/.github/actions/setup-lisp@custom-action - with: - asdf-system: cl-info + - name: Install Documentation Builder + shell: bash + run: | + echo ::group::Install Documentation Builder + qlot exec ros install 40ants/docs-builder + echo ::endgroup:: + + - name: Build Docs + shell: bash + run: | + docs-builder ${{ inputs.asdf-system }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index db0f14f..4d88698 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,6 +23,9 @@ jobs: steps: - uses: actions/checkout@v1 + - uses: 40ants/cl-info/.github/actions/setup-lisp@custom-action + with: + asdf-system: cl-info - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info From 2d479032c84d80ce50cccd9e8d97b93c074c2579 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 13:01:30 +0300 Subject: [PATCH 063/117] Fixed setup-lisp step. --- .github/actions/setup-lisp/action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index fff4525..903a789 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -72,6 +72,9 @@ runs: shell: bash run: | echo ::group::Install ASDF System - qlot exec ros install ${{ inputs.asdf-system }} + if [[ -n "${{ inputs.asdf-system }}" ]]; then + qlot exec ros install ${{ inputs.asdf-system }} + else + echo "ASDF system wasn't provided." + fi echo ::endgroup:: - if: ${{ inputs.asdf-system }} From e54da27e70aea6dbcc8c9912123ee81b9bdf0e1e Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 13:05:40 +0300 Subject: [PATCH 064/117] Fixed path to templater. --- .github/actions/{run-tests => scripts}/templater.ros | 0 .github/actions/setup-lisp/action.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/actions/{run-tests => scripts}/templater.ros (100%) diff --git a/.github/actions/run-tests/templater.ros b/.github/actions/scripts/templater.ros similarity index 100% rename from .github/actions/run-tests/templater.ros rename to .github/actions/scripts/templater.ros diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 903a789..b347b3a 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -56,7 +56,7 @@ runs: echo ::group::Create Qlot Environment if [[ -n "${QLFILE_TEMPLATE}" ]]; then - echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/templater.ros > qlfile + echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/../scripts/templater.ros > qlfile rm -f qlfile.lock fi From 8c1e19b91f4b36593ad0ae16cdc475ad6df8d2d5 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 13:13:44 +0300 Subject: [PATCH 065/117] Using my mgl-pax branch. --- .github/actions/setup-lisp/action.yml | 2 +- .github/workflows/ci.yml | 8 +++----- .github/workflows/docs.yml | 4 +++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index b347b3a..ffff595 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -25,7 +25,7 @@ runs: shell: bash run: | echo ::group::Install Roswell - if [[ "$OS" == "ubuntu-latest" ]]; then + if [[ "$RUNNER_OS" == "Linux ]]; then sudo apt-get -y install git build-essential automake libcurl4-openssl-dev fi if [[ "$OS" == "macos-latest" ]]; then diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ae706f..17b942a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,14 +69,12 @@ jobs: {% ifequal quicklisp_dist "ultralisp" %} dist ultralisp http://dist.ultralisp.org {% endifequal %} + + github mgl-pax 40ants/mgl-pax :branch mgl-pax-minimal + - uses: 40ants/cl-info/.github/actions/run-tests@custom-action with: asdf-system: cl-info - qlfile-template: | - {% ifequal quicklisp_dist "ultralisp" %} - dist ultralisp http://dist.ultralisp.org - {% endifequal %} - # This is additional step to check # a command line script diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4d88698..d2809fb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ on: jobs: build-docs: - runs-on: ubuntu-latest + runs-on: macos-latest env: LISP: sbcl-bin @@ -26,6 +26,8 @@ jobs: - uses: 40ants/cl-info/.github/actions/setup-lisp@custom-action with: asdf-system: cl-info + qlfile-template: | + github mgl-pax 40ants/mgl-pax :branch mgl-pax-minimal - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info From a32b7e9ecf91a7e6432144b4f353c84a24d86102 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 13:15:46 +0300 Subject: [PATCH 066/117] Fixed path to the mgl-pax fork. --- .github/workflows/ci.yml | 2 +- .github/workflows/docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17b942a..90b8315 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: dist ultralisp http://dist.ultralisp.org {% endifequal %} - github mgl-pax 40ants/mgl-pax :branch mgl-pax-minimal + github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal - uses: 40ants/cl-info/.github/actions/run-tests@custom-action with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d2809fb..c1c2f45 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,7 +27,7 @@ jobs: with: asdf-system: cl-info qlfile-template: | - github mgl-pax 40ants/mgl-pax :branch mgl-pax-minimal + github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info From 4c5cb3503a3e04f8ee85bd828eb1374fdecb8248 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 13:57:19 +0300 Subject: [PATCH 067/117] Fixed a typo. --- .github/actions/setup-lisp/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index ffff595..9427939 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -25,7 +25,7 @@ runs: shell: bash run: | echo ::group::Install Roswell - if [[ "$RUNNER_OS" == "Linux ]]; then + if [[ "$RUNNER_OS" == "Linux" ]]; then sudo apt-get -y install git build-essential automake libcurl4-openssl-dev fi if [[ "$OS" == "macos-latest" ]]; then From 8a6720a006be6cc7b5528fe2a2d81ce2ee6d9537 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 13:59:58 +0300 Subject: [PATCH 068/117] Fixed check for the runner on Mac OS. --- .github/actions/setup-lisp/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 9427939..4f1fa57 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -28,7 +28,7 @@ runs: if [[ "$RUNNER_OS" == "Linux" ]]; then sudo apt-get -y install git build-essential automake libcurl4-openssl-dev fi - if [[ "$OS" == "macos-latest" ]]; then + if [[ "$RUNNER_OS" == "macOS" ]]; then brew install automake autoconf curl fi From 23dbef514000e003e18e9d8322dfba9d43b261fa Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 14:02:07 +0300 Subject: [PATCH 069/117] Added an empty line. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90b8315..1f8b60c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,7 @@ jobs: # a command line script - name: Run Command Line Version run: | + echo ::group::Help Argument qlot exec cl-info --help echo ::endgroup:: From dfbbcb52c7ffe17d4db1db929185c7ba129964a6 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 14:10:12 +0300 Subject: [PATCH 070/117] Some debug info. --- .github/actions/build-docs/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index c9dcab8..7fe1e13 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -21,4 +21,8 @@ runs: - name: Build Docs shell: bash run: | + set -x + ls .qlot + ls .qlot/bin + echo $PATH docs-builder ${{ inputs.asdf-system }} From aee23f11c16b6e7b87ee91ea419cd4b3deb026ea Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 14:30:06 +0300 Subject: [PATCH 071/117] More debug info. --- .github/actions/build-docs/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 7fe1e13..91d74ed 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -25,4 +25,6 @@ runs: ls .qlot ls .qlot/bin echo $PATH + cat qlfile + docs-builder ${{ inputs.asdf-system }} From 11e1ea91d9cd26936d665442eaa65091c9bb75ac Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 14:36:48 +0300 Subject: [PATCH 072/117] Echo qlfile. --- .github/actions/setup-lisp/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 4f1fa57..75ee5c9 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -55,11 +55,14 @@ runs: run: | echo ::group::Create Qlot Environment + set -x + if [[ -n "${QLFILE_TEMPLATE}" ]]; then echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/../scripts/templater.ros > qlfile rm -f qlfile.lock fi + echo qlfile qlot install echo ::endgroup:: env: From 7879c05c6033f8c627a032acac8d4912f721072d Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 14:46:08 +0300 Subject: [PATCH 073/117] Changed echo to cat. --- .github/actions/setup-lisp/action.yml | 2 +- .github/workflows/docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 75ee5c9..018fed4 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -62,7 +62,7 @@ runs: rm -f qlfile.lock fi - echo qlfile + cat qlfile qlot install echo ::endgroup:: env: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c1c2f45..a35b7a4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ on: jobs: build-docs: - runs-on: macos-latest + runs-on: ubuntu-latest env: LISP: sbcl-bin From 3b30497f5a4e9db1bb81c959820d263515285911 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 14:51:43 +0300 Subject: [PATCH 074/117] Echo templater. --- .github/actions/setup-lisp/action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 018fed4..0015862 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -57,12 +57,23 @@ runs: set -x + echo '' + echo '' + cat ${{ github.action_path }}/../scripts/templater.ros + echo '' + echo '' + if [[ -n "${QLFILE_TEMPLATE}" ]]; then echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/../scripts/templater.ros > qlfile rm -f qlfile.lock fi + echo 'Here is content of qlfile: cat qlfile + + echo '' + echo '' + qlot install echo ::endgroup:: env: From 8119c7120b1375b79c592a4d010d8560a301a33f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 14:56:19 +0300 Subject: [PATCH 075/117] Remove templater/ --- .github/actions/setup-lisp/action.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 0015862..02965ff 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -57,18 +57,12 @@ runs: set -x - echo '' - echo '' - cat ${{ github.action_path }}/../scripts/templater.ros - echo '' - echo '' - if [[ -n "${QLFILE_TEMPLATE}" ]]; then echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/../scripts/templater.ros > qlfile rm -f qlfile.lock fi - echo 'Here is content of qlfile: + echo 'Here is content of qlfile:' cat qlfile echo '' From c794608c881c2bf7cc063acdee41361540d0568c Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 15:03:19 +0300 Subject: [PATCH 076/117] Content of template. --- .github/actions/setup-lisp/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 02965ff..fc68dd5 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -57,10 +57,20 @@ runs: set -x + cat > qlfile.template < qlfile rm -f qlfile.lock fi + + echo 'Here is content of template:' + cat qlfile.template + + echo '' + echo '' echo 'Here is content of qlfile:' cat qlfile From 60d9e0cd20416df8bcd1354c811e9449214fceb4 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 15:09:39 +0300 Subject: [PATCH 077/117] Debug templater run. --- .github/actions/setup-lisp/action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index fc68dd5..8868d1a 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -65,6 +65,8 @@ runs: echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/../scripts/templater.ros > qlfile rm -f qlfile.lock fi + + cat qlfile.template | ${{ github.action_path }}/../scripts/templater.ros > qlfile2 echo 'Here is content of template:' cat qlfile.template @@ -72,6 +74,12 @@ runs: echo '' echo '' + echo 'Here is content of qlfile2:' + cat qlfile2 + + echo '' + echo '' + echo 'Here is content of qlfile:' cat qlfile From 19813caf67f0e1df18c3dac383a9dfc79509e860 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 15:17:11 +0300 Subject: [PATCH 078/117] Enable ci for ultralissp. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f8b60c..6dce146 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: # - macos-latest quicklisp-dist: - quicklisp -# - ultralisp + - ultralisp lisp: - sbcl-bin # - ccl-bin From 529b3f294c293f7fe2a2a166b80fc4cc9ee76866 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 15:32:32 +0300 Subject: [PATCH 079/117] MOved parts. --- .github/actions/setup-lisp/action.yml | 33 +++++++++++++++------------ 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 8868d1a..37a3d4c 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -60,30 +60,33 @@ runs: cat > qlfile.template < qlfile2 + + + echo 'Here is content of qlfile2:' + cat qlfile2 + + echo '===============' + echo '' + + + echo 'NOW DOING IT OLD WAY' + if [[ -n "${QLFILE_TEMPLATE}" ]]; then echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/../scripts/templater.ros > qlfile rm -f qlfile.lock fi - cat qlfile.template | ${{ github.action_path }}/../scripts/templater.ros > qlfile2 - - echo 'Here is content of template:' - cat qlfile.template - - echo '' - echo '' - - echo 'Here is content of qlfile2:' - cat qlfile2 - - echo '' - echo '' - echo 'Here is content of qlfile:' cat qlfile - echo '' + echo '===============' echo '' qlot install From 3930735b7ccf1d68ba422bba347ac6c8b902c23b Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 15:36:16 +0300 Subject: [PATCH 080/117] Removed trace. --- .github/actions/setup-lisp/action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index 37a3d4c..a4a736e 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -55,8 +55,6 @@ runs: run: | echo ::group::Create Qlot Environment - set -x - cat > qlfile.template < Date: Sat, 6 Feb 2021 15:46:31 +0300 Subject: [PATCH 081/117] Templater was fixed. --- .github/actions/scripts/templater.ros | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/actions/scripts/templater.ros b/.github/actions/scripts/templater.ros index 731d706..a52fdac 100755 --- a/.github/actions/scripts/templater.ros +++ b/.github/actions/scripts/templater.ros @@ -26,10 +26,22 @@ exec ros -Q -L sbcl-bin -- $0 "$@" value)))) +(defun interpose (separator list) + "Returns a sequence of the elements of SEQUENCE separated by SEPARATOR." + (labels ((rec (s acc) + (if s + (rec (cdr s) (nconc acc + (list separator (car s)))) + acc))) + (cdr (rec list nil)))) + + (defun main (&rest argv) (declare (ignore argv)) (let* ((lines (uiop:slurp-stream-lines *standard-input*)) - (template-text (apply #'concatenate 'string lines)) + (template-text (apply #'concatenate 'string + (interpose (string #\Newline) + lines))) (template (djula::compile-string template-text)) (arguments (collect-arguments))) (apply #'djula:render-template* From ddbe7f6a739bce32408933bef0dadfbf6f889e04 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 15:53:46 +0300 Subject: [PATCH 082/117] Debug docs builder. --- .github/workflows/docs.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a35b7a4..b4434a1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,6 +28,13 @@ jobs: asdf-system: cl-info qlfile-template: | github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal + - name: Start SSH session + uses: luchihoratiu/debug-via-ssh@main + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + NGROK_REGION: eu + SSH_PASS: ${{ secrets.SSH_PASS }} + - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info From f56af398820582afd989f296164c6c18b9fe98bc Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 15:55:29 +0300 Subject: [PATCH 083/117] Removed experiment with template file. --- .github/actions/setup-lisp/action.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/actions/setup-lisp/action.yml b/.github/actions/setup-lisp/action.yml index a4a736e..28bf093 100644 --- a/.github/actions/setup-lisp/action.yml +++ b/.github/actions/setup-lisp/action.yml @@ -55,35 +55,14 @@ runs: run: | echo ::group::Create Qlot Environment - cat > qlfile.template < qlfile2 - - - echo 'Here is content of qlfile2:' - cat qlfile2 - - echo '===============' - echo '' - - - echo 'NOW DOING IT OLD WAY' - if [[ -n "${QLFILE_TEMPLATE}" ]]; then echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/../scripts/templater.ros > qlfile rm -f qlfile.lock fi echo 'Here is content of qlfile:' + echo '===============' cat qlfile - echo '===============' echo '' From 055961a0901795bcad5f46bc0356f47edcd25427 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 16:16:02 +0300 Subject: [PATCH 084/117] Fixed docs builder installation. --- .github/actions/build-docs/action.yml | 7 ++++++- .github/workflows/docs.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 91d74ed..6f2596b 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -15,7 +15,12 @@ runs: shell: bash run: | echo ::group::Install Documentation Builder - qlot exec ros install 40ants/docs-builder + + echo 'github docs-builder 40ants/docs-builder' >> qlfile + + qlot update + + qlot exec ros install docs-builder echo ::endgroup:: - name: Build Docs diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b4434a1..b32041c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,12 +28,12 @@ jobs: asdf-system: cl-info qlfile-template: | github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal - - name: Start SSH session - uses: luchihoratiu/debug-via-ssh@main - with: - NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} - NGROK_REGION: eu - SSH_PASS: ${{ secrets.SSH_PASS }} + # - name: Start SSH session + # uses: luchihoratiu/debug-via-ssh@main + # with: + # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + # NGROK_REGION: eu + # SSH_PASS: ${{ secrets.SSH_PASS }} - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: From 893d57b30335a6136baadec02e3c2b2f0be8e4c1 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 16:17:33 +0300 Subject: [PATCH 085/117] Fixed command name. --- .github/actions/build-docs/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 6f2596b..e17301d 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -32,4 +32,4 @@ runs: echo $PATH cat qlfile - docs-builder ${{ inputs.asdf-system }} + build-docs ${{ inputs.asdf-system }} From 7772f6f8c729896048b8e8b7a5029539e3b6a01f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 16:41:32 +0300 Subject: [PATCH 086/117] Added upload script. --- .github/actions/build-docs/action.yml | 18 +-- .github/actions/build-docs/upload.ros | 170 ++++++++++++++++++++++++++ 2 files changed, 181 insertions(+), 7 deletions(-) create mode 100755 .github/actions/build-docs/upload.ros diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index e17301d..1d24020 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -24,12 +24,16 @@ runs: echo ::endgroup:: - name: Build Docs + id: build-docs shell: bash run: | - set -x - ls .qlot - ls .qlot/bin - echo $PATH - cat qlfile - - build-docs ${{ inputs.asdf-system }} + OUTPUT_DIR=$(build-docs ${{ inputs.asdf-system }}) + + echo "::set-output name=build-dir::${OUTPUT_DIR}" + + - name: Upload Docs + shell: bash + run: | + BUILD_DIR=${{ steps.build-docs.outputs.build-dir }} + + ${{ github.action_path }}/upload.ros "${BUILD_DIR}" diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros new file mode 100755 index 0000000..ce34c5c --- /dev/null +++ b/.github/actions/build-docs/upload.ros @@ -0,0 +1,170 @@ +#!/bin/sh +#|-*- mode:lisp -*-|# +#| +exec ros -Q -- $0 "$@" +|# +(progn ;;init forms + (ros:ensure-asdf) + #+quicklisp(ql:quickload '() :silent t)) + +(defpackage :ros.script.upload + (:use :cl)) +(in-package :ros.script.upload) + + +(defvar *current-dir*) + + +(define-condition unable-to-proceed (simple-error) + ((message :initarg :message + :reader get-message)) + (:report (lambda (condition stream) + (format stream (get-message condition))))) + + +(define-condition subprocess-error-with-output (uiop::subprocess-error) + ((stdout :initarg :stdout :reader subprocess-error-stdout) + (stderr :initarg :stderr :reader subprocess-error-stderr)) + (:report (lambda (condition stream) + (format stream "Subprocess ~@[~S~% ~]~@[with command ~S~% ~]exited with error~@[ code ~D ~]~@[ and this text at stderr:~% ~S~]" + (uiop:subprocess-error-process condition) + (uiop:subprocess-error-command condition) + (uiop:subprocess-error-code condition) + (subprocess-error-stderr condition))))) + + +(defun run (command &key (raise t)) + "Runs command and returns it's stdout stderr and code. + +If there was an error, raises subprocess-error-with-output, but this +behaviour could be overriden by keyword argument ``:raise t``." + + (multiple-value-bind (stdout stderr code) + (uiop:run-program command + :output '(:string :stripped t) + :error-output '(:string :stripped t) + :ignore-error-status t) + + (when (and raise + (not (eql code 0))) + (error 'subprocess-error-with-output + :stdout stdout + :stderr stderr + :code code + :command command)) + (values stdout stderr code))) + + +(defun gh-pages-repository-initialized-p () + "Checks if repository for documentation already initialized" + (uiop:directory-exists-p "docs/build/.git")) + + +(defun git (&rest commands) + "Calls git command in gh-pages repository." + + (uiop:with-current-directory (*current-dir*) + (let ((command (apply #'concatenate 'string + "git " + commands))) + + (log:info "Running" command "in" path) + (run command)))) + + +(defun git-repository-was-changed-p () + ;; if git status returns something, then repository have uncommitted changes + (> (length (git "status --porcelain")) + 0)) + + +(defun get-git-upstream () + ;; taken from http://stackoverflow.com/a/9753364/70293 + (let ((upstream (run "git rev-parse --abbrev-ref --symbolic-full-name @{u}" :raise nil))) + (when (> (length upstream) + 0) + (subseq upstream + 0 + (search "/" upstream))))) + + +(defun get-origin-to-push () + (let ((upstream (get-git-upstream))) + + (cond + (upstream + ;; If there is already some remote upstream, then use it + (run (concatenate 'string "git remote get-url " upstream))) + ;; If we are running inside github actions + ((uiop:getenv "GITHUB_ACTIONS") + (unless (uiop:getenv "GITHUB_TOKEN") + (error 'unable-to-proceed + :message "Please, provide GITHUB_TOKEN environment variable.")) + (format nil "https://~A:~A@github.com/~A" + (uiop:getenv "GITHUB_ACTOR") + (uiop:getenv "GITHUB_TOKEN") + (uiop:getenv "GITHUB_REPOSITORY"))) + ;; otherwise make it from travis secret token and repo slug + (t + (let ((repo-slug (uiop:getenv "TRAVIS_REPO_SLUG")) + (repo-token (uiop:getenv "GH_REPO_TOKEN"))) + + (unless (and repo-slug repo-token) + (error 'unable-to-proceed + :message "Current branch does not track any upstream and there is no TRAVIS_REPO_SLUG and GH_REPO_TOKEN env variables. Where to push gh-pages branch?")) + + (format nil "https://~A@github.com/~A" + repo-token + repo-slug)))))) + + +(defun push-gh-pages (docs-dir) + (log:info "Pushing changes to gh-pages branch") + + (let ((*current-dir* docs-dir)) + + (unless (gh-pages-repository-initialized-p) + (git "init") + + (git "remote add origin " + (get-origin-to-push))) + + (git "add .") + + (cond + ((git-repository-was-changed-p) + (when (uiop:getenv "GITHUB_ACTIONS") + (git "config --global user.name \"github-actions[bot]\"") + (git "config --global user.email \"actions@github.com\"")) + (git "commit -m 'Update docs'") + + (git "push --force origin master:gh-pages")) + ;; or + (t (log:info "Everything is up to date."))))) + + +(defun main (&rest argv) + (log:info "Uploading documentation") + + (unless argv + (log:error "Please, specify a directory with HTML docs.") + (uiop:quit 1)) + + (let ((docs-dir (uiop:parse-unix-namestring (first argv) + :ensure-directory t))) + + (handler-bind ((error (lambda (condition) + (uiop:print-condition-backtrace condition :stream *error-output*) + (uiop:quit 1)))) + (unless (probe-file docs-dir) + (log:error "Directory \"~A not found" + docs-dir) + (uiop:quit 1)) + + (uiop:with-output-file (s (uiop:merge-pathnames* #P".nojekyll" + docs-dir) + :if-exists :overwrite) + (declare (ignorable s))) + (push-gh-pages docs-dir)))) + +;;; vim: set ft=lisp lisp: From 5d2a6db1c24804bb437911d285fa3e0984ba2a0e Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 16:42:47 +0300 Subject: [PATCH 087/117] Fixed check for .git dir. --- .github/actions/build-docs/upload.ros | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros index ce34c5c..2da7f69 100755 --- a/.github/actions/build-docs/upload.ros +++ b/.github/actions/build-docs/upload.ros @@ -55,9 +55,10 @@ behaviour could be overriden by keyword argument ``:raise t``." (values stdout stderr code))) -(defun gh-pages-repository-initialized-p () +(defun gh-pages-repository-initialized-p (docs-dir) "Checks if repository for documentation already initialized" - (uiop:directory-exists-p "docs/build/.git")) + (uiop:directory-exists-p (uiop:merge-pathnames* #P".git/" + docs-dir))) (defun git (&rest commands) @@ -123,7 +124,7 @@ behaviour could be overriden by keyword argument ``:raise t``." (let ((*current-dir* docs-dir)) - (unless (gh-pages-repository-initialized-p) + (unless (gh-pages-repository-initialized-p docs-dir) (git "init") (git "remote add origin " From e828dbb1a56618c3ad473f8e80ee4d87b03d8d0d Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 16:50:31 +0300 Subject: [PATCH 088/117] More grouping. --- .github/actions/build-docs/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 1d24020..f0c65dc 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -27,13 +27,17 @@ runs: id: build-docs shell: bash run: | + echo ::group::Build Docs OUTPUT_DIR=$(build-docs ${{ inputs.asdf-system }}) echo "::set-output name=build-dir::${OUTPUT_DIR}" + echo ::endgroup:: - name: Upload Docs shell: bash run: | + echo ::group::Upload Docs BUILD_DIR=${{ steps.build-docs.outputs.build-dir }} ${{ github.action_path }}/upload.ros "${BUILD_DIR}" + echo ::endgroup:: From 239ab6c784bbf94099c20dafd20d78873cfde01d Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 16:59:46 +0300 Subject: [PATCH 089/117] Trying backwquotess. --- .github/actions/build-docs/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index f0c65dc..a434e2a 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -28,7 +28,7 @@ runs: shell: bash run: | echo ::group::Build Docs - OUTPUT_DIR=$(build-docs ${{ inputs.asdf-system }}) + OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` echo "::set-output name=build-dir::${OUTPUT_DIR}" echo ::endgroup:: From c82f20df5bdf6e3d080847ec79ffb263319598bd Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 20:30:14 +0300 Subject: [PATCH 090/117] Added ngrok steps to the action. --- .github/actions/build-docs/action.yml | 125 ++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index a434e2a..c22ee2d 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -23,6 +23,131 @@ runs: qlot exec ros install docs-builder echo ::endgroup:: + - name: Check inputs + run: | + if [ -z "${{ secrets.SSH_PASS }}" ] + then + echo "SSH_PASS needs to be passed in the 'with' field." + exit 1 + fi + if [ -z "${{ secrets.NGROK_AUTH_TOKEN }}" ] + then + echo "NGROK_AUTH_TOKEN needs to be passed in the 'with' field." + exit 1 + fi + shell: bash + - name: Meet OS specific prerequisites + run: | + if('${{ runner.os }}' -eq 'Linux') + { + printf "# Preparing environment..." + echo "ngrok-stable-linux-386.zip" > ngrok_zip_name + whoami > ssh_user + printf " [DONE]\n\n" + + echo "# Change the SSH user password" + echo "${{ secrets.SSH_PASS }}`n${{ secrets.SSH_PASS }}" | sudo passwd $(cat ssh_user) + } + elseif('${{ runner.os }}' -eq 'macOS') + { + printf "# Preparing environment..." + echo "ngrok-stable-darwin-amd64.zip" > ngrok_zip_name + echo "root" > ssh_user + printf " [DONE]\n\n" + + echo "# Change the SSH user password" + echo 'PermitRootLogin yes' | sudo tee -a /etc/ssh/sshd_config >/dev/null + sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist + sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist + echo "${{ secrets.SSH_PASS }}`n${{ secrets.SSH_PASS }}" | sudo passwd "root" + } + elseif('${{ runner.os }}' -eq 'Windows') + { + printf "# Preparing environment..." + echo "ngrok-stable-windows-amd64.zip" > ngrok_zip_name + echo $env:UserName > ssh_user + printf " [DONE]\n\n" + + echo "# Install SSH server" + curl https://dl.bitvise.com/BvSshServer-Inst.exe --output BvSshServer-Inst.exe + .\BvSshServer-Inst.exe -acceptEULA -defaultInstance + + printf "# Setting up the SSH server to allow access..." + $cfg = new-object -com "BssCfg815.BssCfg815" + $cfg.settings.SetDefaults() + $cfg.settings.access.SetDefaults() + $cfg.settings.access.winGroups.Clear() + $cfg.settings.access.winGroups.new.SetDefaults() + $cfg.settings.access.winGroups.new.loginAllowed = $true + $cfg.settings.access.winGroups.NewCommit() + $cfg.settings.Save() + printf " [DONE]\n\n" + + echo "# Add Firewall rule to allow inbound TCP connection on local port 22" + New-NetFirewallRule -Name ngrok -DisplayName 'ngrok' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 + + echo "# Start the SSH server" + net start BvSshServer + + echo "# Change the SSH user password" + net user $env:UserName ${{ secrets.SSH_PASS }} + } + shell: pwsh + + - name: Install and setup ngrok + run: | + echo "# Install ngrok" + curl https://bin.equinox.io/c/4VmDzA7iaHb/$(cat ngrok_zip_name) --output ngrok.zip + unzip ngrok.zip + chmod +x ./ngrok + echo "# Set ngrok with the given authentification token" + ./ngrok authtoken ${{ secrets.NGROK_AUTH_TOKEN }} + shell: bash + + - name: Start ngrok + run: | + printf "# Starting ngrok..." + ./ngrok tcp 22 --log ".ngrok.log" --region "${{ secrets.NGROK_REGION }}" & + printf " [DONE]\n\n" + printf "# Waiting for '.ngrok.log' file to be properly generated..." + while ! grep -osqE "tcp://(.+)" .ngrok.log;do + sleep 1 + if grep -sq "command failed" .ngrok.log + then + exit 1 + fi + done + printf " [DONE]\n\n" + ssh_string=$(grep -oE "tcp://(.+)" .ngrok.log | sed "s/tcp:\/\//ssh $(cat ssh_user)@/" | sed "s/:/ -p /") + continue_path=$(eval echo ~$(cat ssh_user)/continue) + time=${{ secrets.NGROK_TIMEOUT }} + while [ ! -e $continue_path ] && [ $time -gt 1 ] + do + echo "" + echo "#################" + echo "# Connect to this runner using:" + echo "#########################################" + echo $ssh_string + echo "#########################################" + echo "#" + echo "# Allow workflow to continue using:" + echo "#########################################" + echo "bash -c \"touch $continue_path\"" + echo "#########################################" + echo "#" + echo "# SSH session time left:" + echo "########################################" + printf '#%-14s%dh:%02dm:%02ds%-14s#\n' '' $(($time/3600)) $(($time%3600/60)) $(($time%60)) '' + echo "########################################" + echo "" + + sleep 10 + time=$((time-10)) + done + echo "# SSH session terminated. Allowing workflow to continue..." + shell: bash + + - name: Build Docs id: build-docs shell: bash From a44a6e8e4adba3f73389a1969a8bca28cd2f0e49 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 20:38:00 +0300 Subject: [PATCH 091/117] Replaced secrets with inputs. --- .github/actions/build-docs/action.yml | 22 ++++++++++++++-------- .github/workflows/docs.yml | 3 +++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index c22ee2d..98a6ec0 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -7,6 +7,12 @@ inputs: qlfile-template: description: "Djula template for qlfile. All environment variables are available in it's context" required: false + SSH_PASS: + description: 'Password for SSH session' + required: true + NGROK_AUTH_TOKEN: + description: 'Authentification token for ngrok' + required: true runs: using: composite @@ -25,12 +31,12 @@ runs: - name: Check inputs run: | - if [ -z "${{ secrets.SSH_PASS }}" ] + if [ -z "${{ inputs.SSH_PASS }}" ] then echo "SSH_PASS needs to be passed in the 'with' field." exit 1 fi - if [ -z "${{ secrets.NGROK_AUTH_TOKEN }}" ] + if [ -z "${{ inputs.NGROK_AUTH_TOKEN }}" ] then echo "NGROK_AUTH_TOKEN needs to be passed in the 'with' field." exit 1 @@ -46,7 +52,7 @@ runs: printf " [DONE]\n\n" echo "# Change the SSH user password" - echo "${{ secrets.SSH_PASS }}`n${{ secrets.SSH_PASS }}" | sudo passwd $(cat ssh_user) + echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd $(cat ssh_user) } elseif('${{ runner.os }}' -eq 'macOS') { @@ -59,7 +65,7 @@ runs: echo 'PermitRootLogin yes' | sudo tee -a /etc/ssh/sshd_config >/dev/null sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist - echo "${{ secrets.SSH_PASS }}`n${{ secrets.SSH_PASS }}" | sudo passwd "root" + echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd "root" } elseif('${{ runner.os }}' -eq 'Windows') { @@ -90,7 +96,7 @@ runs: net start BvSshServer echo "# Change the SSH user password" - net user $env:UserName ${{ secrets.SSH_PASS }} + net user $env:UserName ${{ inputs.SSH_PASS }} } shell: pwsh @@ -101,13 +107,13 @@ runs: unzip ngrok.zip chmod +x ./ngrok echo "# Set ngrok with the given authentification token" - ./ngrok authtoken ${{ secrets.NGROK_AUTH_TOKEN }} + ./ngrok authtoken ${{ inputs.NGROK_AUTH_TOKEN }} shell: bash - name: Start ngrok run: | printf "# Starting ngrok..." - ./ngrok tcp 22 --log ".ngrok.log" --region "${{ secrets.NGROK_REGION }}" & + ./ngrok tcp 22 --log ".ngrok.log" --region "${{ inputs.NGROK_REGION }}" & printf " [DONE]\n\n" printf "# Waiting for '.ngrok.log' file to be properly generated..." while ! grep -osqE "tcp://(.+)" .ngrok.log;do @@ -120,7 +126,7 @@ runs: printf " [DONE]\n\n" ssh_string=$(grep -oE "tcp://(.+)" .ngrok.log | sed "s/tcp:\/\//ssh $(cat ssh_user)@/" | sed "s/:/ -p /") continue_path=$(eval echo ~$(cat ssh_user)/continue) - time=${{ secrets.NGROK_TIMEOUT }} + time=${{ inputs.NGROK_TIMEOUT }} while [ ! -e $continue_path ] && [ $time -gt 1 ] do echo "" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b32041c..351c84f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,3 +38,6 @@ jobs: - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + SSH_PASS: ${{ secrets.SSH_PASS }} From 1caa4bdbf6716077525e1510dba8626704d9381b Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 20:40:06 +0300 Subject: [PATCH 092/117] Fixed with. --- .github/workflows/docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 351c84f..432ddc9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,6 +38,5 @@ jobs: - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info - with: NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} SSH_PASS: ${{ secrets.SSH_PASS }} From db96d7c01c8dcc5ee57ae64de25ac9a864c2b17e Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 20:47:46 +0300 Subject: [PATCH 093/117] Strict options and defaultss. --- .github/actions/build-docs/action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 98a6ec0..cbb4517 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -13,6 +13,13 @@ inputs: NGROK_AUTH_TOKEN: description: 'Authentification token for ngrok' required: true + NGROK_REGION: + description: 'Region for ngrok session' + required: false + default: 'us' + NGROK_TIMEOUT: + description: 'Timeout in seconds for ngrok session' + default: 21500 runs: using: composite @@ -112,6 +119,7 @@ runs: - name: Start ngrok run: | + set -Eeuo pipefail printf "# Starting ngrok..." ./ngrok tcp 22 --log ".ngrok.log" --region "${{ inputs.NGROK_REGION }}" & printf " [DONE]\n\n" From 5df131f7e192bcdffd1451d235286bb6c0facc82 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 21:06:42 +0300 Subject: [PATCH 094/117] Fixed some errors. --- .github/actions/build-docs/upload.ros | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros index 2da7f69..b87e7b0 100755 --- a/.github/actions/build-docs/upload.ros +++ b/.github/actions/build-docs/upload.ros @@ -5,7 +5,9 @@ exec ros -Q -- $0 "$@" |# (progn ;;init forms (ros:ensure-asdf) - #+quicklisp(ql:quickload '() :silent t)) + #+quicklisp + (ql:quickload '(log4cl) + :silent t)) (defpackage :ros.script.upload (:use :cl)) @@ -69,7 +71,7 @@ behaviour could be overriden by keyword argument ``:raise t``." "git " commands))) - (log:info "Running" command "in" path) + (log:info "Running" command "in" *current-dir*) (run command)))) From d903b9a2d1013a6d80f8bcefcf317369d68c6155 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 21:08:18 +0300 Subject: [PATCH 095/117] Commented ngrok. --- .github/actions/build-docs/action.yml | 255 +++++++++++++------------- 1 file changed, 128 insertions(+), 127 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index cbb4517..f412107 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -7,19 +7,19 @@ inputs: qlfile-template: description: "Djula template for qlfile. All environment variables are available in it's context" required: false - SSH_PASS: - description: 'Password for SSH session' - required: true - NGROK_AUTH_TOKEN: - description: 'Authentification token for ngrok' - required: true - NGROK_REGION: - description: 'Region for ngrok session' - required: false - default: 'us' - NGROK_TIMEOUT: - description: 'Timeout in seconds for ngrok session' - default: 21500 + # SSH_PASS: + # description: 'Password for SSH session' + # required: true + # NGROK_AUTH_TOKEN: + # description: 'Authentification token for ngrok' + # required: true + # NGROK_REGION: + # description: 'Region for ngrok session' + # required: false + # default: 'us' + # NGROK_TIMEOUT: + # description: 'Timeout in seconds for ngrok session' + # default: 21500 runs: using: composite @@ -36,130 +36,130 @@ runs: qlot exec ros install docs-builder echo ::endgroup:: - - name: Check inputs - run: | - if [ -z "${{ inputs.SSH_PASS }}" ] - then - echo "SSH_PASS needs to be passed in the 'with' field." - exit 1 - fi - if [ -z "${{ inputs.NGROK_AUTH_TOKEN }}" ] - then - echo "NGROK_AUTH_TOKEN needs to be passed in the 'with' field." - exit 1 - fi - shell: bash - - name: Meet OS specific prerequisites - run: | - if('${{ runner.os }}' -eq 'Linux') - { - printf "# Preparing environment..." - echo "ngrok-stable-linux-386.zip" > ngrok_zip_name - whoami > ssh_user - printf " [DONE]\n\n" + # - name: Check inputs + # run: | + # if [ -z "${{ inputs.SSH_PASS }}" ] + # then + # echo "SSH_PASS needs to be passed in the 'with' field." + # exit 1 + # fi + # if [ -z "${{ inputs.NGROK_AUTH_TOKEN }}" ] + # then + # echo "NGROK_AUTH_TOKEN needs to be passed in the 'with' field." + # exit 1 + # fi + # shell: bash + # - name: Meet OS specific prerequisites + # run: | + # if('${{ runner.os }}' -eq 'Linux') + # { + # printf "# Preparing environment..." + # echo "ngrok-stable-linux-386.zip" > ngrok_zip_name + # whoami > ssh_user + # printf " [DONE]\n\n" - echo "# Change the SSH user password" - echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd $(cat ssh_user) - } - elseif('${{ runner.os }}' -eq 'macOS') - { - printf "# Preparing environment..." - echo "ngrok-stable-darwin-amd64.zip" > ngrok_zip_name - echo "root" > ssh_user - printf " [DONE]\n\n" + # echo "# Change the SSH user password" + # echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd $(cat ssh_user) + # } + # elseif('${{ runner.os }}' -eq 'macOS') + # { + # printf "# Preparing environment..." + # echo "ngrok-stable-darwin-amd64.zip" > ngrok_zip_name + # echo "root" > ssh_user + # printf " [DONE]\n\n" - echo "# Change the SSH user password" - echo 'PermitRootLogin yes' | sudo tee -a /etc/ssh/sshd_config >/dev/null - sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist - sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist - echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd "root" - } - elseif('${{ runner.os }}' -eq 'Windows') - { - printf "# Preparing environment..." - echo "ngrok-stable-windows-amd64.zip" > ngrok_zip_name - echo $env:UserName > ssh_user - printf " [DONE]\n\n" + # echo "# Change the SSH user password" + # echo 'PermitRootLogin yes' | sudo tee -a /etc/ssh/sshd_config >/dev/null + # sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist + # sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist + # echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd "root" + # } + # elseif('${{ runner.os }}' -eq 'Windows') + # { + # printf "# Preparing environment..." + # echo "ngrok-stable-windows-amd64.zip" > ngrok_zip_name + # echo $env:UserName > ssh_user + # printf " [DONE]\n\n" - echo "# Install SSH server" - curl https://dl.bitvise.com/BvSshServer-Inst.exe --output BvSshServer-Inst.exe - .\BvSshServer-Inst.exe -acceptEULA -defaultInstance + # echo "# Install SSH server" + # curl https://dl.bitvise.com/BvSshServer-Inst.exe --output BvSshServer-Inst.exe + # .\BvSshServer-Inst.exe -acceptEULA -defaultInstance - printf "# Setting up the SSH server to allow access..." - $cfg = new-object -com "BssCfg815.BssCfg815" - $cfg.settings.SetDefaults() - $cfg.settings.access.SetDefaults() - $cfg.settings.access.winGroups.Clear() - $cfg.settings.access.winGroups.new.SetDefaults() - $cfg.settings.access.winGroups.new.loginAllowed = $true - $cfg.settings.access.winGroups.NewCommit() - $cfg.settings.Save() - printf " [DONE]\n\n" + # printf "# Setting up the SSH server to allow access..." + # $cfg = new-object -com "BssCfg815.BssCfg815" + # $cfg.settings.SetDefaults() + # $cfg.settings.access.SetDefaults() + # $cfg.settings.access.winGroups.Clear() + # $cfg.settings.access.winGroups.new.SetDefaults() + # $cfg.settings.access.winGroups.new.loginAllowed = $true + # $cfg.settings.access.winGroups.NewCommit() + # $cfg.settings.Save() + # printf " [DONE]\n\n" - echo "# Add Firewall rule to allow inbound TCP connection on local port 22" - New-NetFirewallRule -Name ngrok -DisplayName 'ngrok' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 + # echo "# Add Firewall rule to allow inbound TCP connection on local port 22" + # New-NetFirewallRule -Name ngrok -DisplayName 'ngrok' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 - echo "# Start the SSH server" - net start BvSshServer + # echo "# Start the SSH server" + # net start BvSshServer - echo "# Change the SSH user password" - net user $env:UserName ${{ inputs.SSH_PASS }} - } - shell: pwsh + # echo "# Change the SSH user password" + # net user $env:UserName ${{ inputs.SSH_PASS }} + # } + # shell: pwsh - - name: Install and setup ngrok - run: | - echo "# Install ngrok" - curl https://bin.equinox.io/c/4VmDzA7iaHb/$(cat ngrok_zip_name) --output ngrok.zip - unzip ngrok.zip - chmod +x ./ngrok - echo "# Set ngrok with the given authentification token" - ./ngrok authtoken ${{ inputs.NGROK_AUTH_TOKEN }} - shell: bash + # - name: Install and setup ngrok + # run: | + # echo "# Install ngrok" + # curl https://bin.equinox.io/c/4VmDzA7iaHb/$(cat ngrok_zip_name) --output ngrok.zip + # unzip ngrok.zip + # chmod +x ./ngrok + # echo "# Set ngrok with the given authentification token" + # ./ngrok authtoken ${{ inputs.NGROK_AUTH_TOKEN }} + # shell: bash - - name: Start ngrok - run: | - set -Eeuo pipefail - printf "# Starting ngrok..." - ./ngrok tcp 22 --log ".ngrok.log" --region "${{ inputs.NGROK_REGION }}" & - printf " [DONE]\n\n" - printf "# Waiting for '.ngrok.log' file to be properly generated..." - while ! grep -osqE "tcp://(.+)" .ngrok.log;do - sleep 1 - if grep -sq "command failed" .ngrok.log - then - exit 1 - fi - done - printf " [DONE]\n\n" - ssh_string=$(grep -oE "tcp://(.+)" .ngrok.log | sed "s/tcp:\/\//ssh $(cat ssh_user)@/" | sed "s/:/ -p /") - continue_path=$(eval echo ~$(cat ssh_user)/continue) - time=${{ inputs.NGROK_TIMEOUT }} - while [ ! -e $continue_path ] && [ $time -gt 1 ] - do - echo "" - echo "#################" - echo "# Connect to this runner using:" - echo "#########################################" - echo $ssh_string - echo "#########################################" - echo "#" - echo "# Allow workflow to continue using:" - echo "#########################################" - echo "bash -c \"touch $continue_path\"" - echo "#########################################" - echo "#" - echo "# SSH session time left:" - echo "########################################" - printf '#%-14s%dh:%02dm:%02ds%-14s#\n' '' $(($time/3600)) $(($time%3600/60)) $(($time%60)) '' - echo "########################################" - echo "" + # - name: Start ngrok + # run: | + # set -Eeuo pipefail + # printf "# Starting ngrok..." + # ./ngrok tcp 22 --log ".ngrok.log" --region "${{ inputs.NGROK_REGION }}" & + # printf " [DONE]\n\n" + # printf "# Waiting for '.ngrok.log' file to be properly generated..." + # while ! grep -osqE "tcp://(.+)" .ngrok.log;do + # sleep 1 + # if grep -sq "command failed" .ngrok.log + # then + # exit 1 + # fi + # done + # printf " [DONE]\n\n" + # ssh_string=$(grep -oE "tcp://(.+)" .ngrok.log | sed "s/tcp:\/\//ssh $(cat ssh_user)@/" | sed "s/:/ -p /") + # continue_path=$(eval echo ~$(cat ssh_user)/continue) + # time=${{ inputs.NGROK_TIMEOUT }} + # while [ ! -e $continue_path ] && [ $time -gt 1 ] + # do + # echo "" + # echo "#################" + # echo "# Connect to this runner using:" + # echo "#########################################" + # echo $ssh_string + # echo "#########################################" + # echo "#" + # echo "# Allow workflow to continue using:" + # echo "#########################################" + # echo "bash -c \"touch $continue_path\"" + # echo "#########################################" + # echo "#" + # echo "# SSH session time left:" + # echo "########################################" + # printf '#%-14s%dh:%02dm:%02ds%-14s#\n' '' $(($time/3600)) $(($time%3600/60)) $(($time%60)) '' + # echo "########################################" + # echo "" - sleep 10 - time=$((time-10)) - done - echo "# SSH session terminated. Allowing workflow to continue..." - shell: bash + # sleep 10 + # time=$((time-10)) + # done + # echo "# SSH session terminated. Allowing workflow to continue..." + # shell: bash - name: Build Docs @@ -175,6 +175,7 @@ runs: - name: Upload Docs shell: bash run: | + set -Eeuo pipefail echo ::group::Upload Docs BUILD_DIR=${{ steps.build-docs.outputs.build-dir }} From c1d71f7ab30ce6187cd113b1ce763837e91790f7 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 21:22:25 +0300 Subject: [PATCH 096/117] Debug with traces --- .github/actions/build-docs/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index f412107..36b843b 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -167,17 +167,23 @@ runs: shell: bash run: | echo ::group::Build Docs + echo "TRACE 1" OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` - + echo "TRACE 2" echo "::set-output name=build-dir::${OUTPUT_DIR}" + echo "TRACE 3" echo ::endgroup:: + echo "TRACE 4" - name: Upload Docs shell: bash run: | set -Eeuo pipefail + echo "TRACE 5" echo ::group::Upload Docs + echo "TRACE 6" BUILD_DIR=${{ steps.build-docs.outputs.build-dir }} - + echo "TRACE 7" ${{ github.action_path }}/upload.ros "${BUILD_DIR}" + echo "TRACE 8" echo ::endgroup:: From b6dda62814e68a77489e95e8156704202a2a55b9 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 21:22:55 +0300 Subject: [PATCH 097/117] Added sset -x --- .github/actions/build-docs/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 36b843b..802fd46 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -166,6 +166,7 @@ runs: id: build-docs shell: bash run: | + set -x echo ::group::Build Docs echo "TRACE 1" OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` @@ -178,6 +179,7 @@ runs: - name: Upload Docs shell: bash run: | + set -x set -Eeuo pipefail echo "TRACE 5" echo ::group::Upload Docs From 50f4c9a71bf474f89831b50e3528d409e1ad0827 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 21:31:47 +0300 Subject: [PATCH 098/117] Added quotes --- .github/actions/build-docs/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 802fd46..fac8ef5 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -184,7 +184,7 @@ runs: echo "TRACE 5" echo ::group::Upload Docs echo "TRACE 6" - BUILD_DIR=${{ steps.build-docs.outputs.build-dir }} + BUILD_DIR="${{ steps.build-docs.outputs.build-dir }}" echo "TRACE 7" ${{ github.action_path }}/upload.ros "${BUILD_DIR}" echo "TRACE 8" From a7eb5a3f910938fecc61d4aa4474729c6c1928bc Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 21:35:08 +0300 Subject: [PATCH 099/117] show output dir. --- .github/actions/build-docs/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index fac8ef5..56d5ccf 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -170,6 +170,10 @@ runs: echo ::group::Build Docs echo "TRACE 1" OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` + echo "TRACE 1_1" + echo ============= + echo ${OUTPUT_DIR} + echo ============= echo "TRACE 2" echo "::set-output name=build-dir::${OUTPUT_DIR}" echo "TRACE 3" From 8a94eb870fbd6a182d55f9a718da7b583891ea1f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 21:47:14 +0300 Subject: [PATCH 100/117] Sstruggiling debugging. --- .github/actions/build-docs/action.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 56d5ccf..ac14cc0 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -169,11 +169,25 @@ runs: set -x echo ::group::Build Docs echo "TRACE 1" - OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` - echo "TRACE 1_1" + # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` + + build-docs ${{ inputs.asdf-system }} > build-docs.out 2> build-docs.err + + # echo "TRACE 1_1" + # echo ============= + # echo ${OUTPUT_DIR} + # echo ============= + + echo "TRACE 1_out" echo ============= - echo ${OUTPUT_DIR} + cat build-docs.out echo ============= + + echo "TRACE 1_err" + echo ============= + cat build-docs.err + echo ============= + echo "TRACE 2" echo "::set-output name=build-dir::${OUTPUT_DIR}" echo "TRACE 3" From 599441e08c6dbbd33058ee45f3c0ef0c8c6c02a9 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 22:24:25 +0300 Subject: [PATCH 101/117] Add output dir. --- .github/actions/build-docs/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index ac14cc0..f1e6b2a 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -187,6 +187,8 @@ runs: echo ============= cat build-docs.err echo ============= + + OUTPUT_DIR=$(cat build-docs.out) echo "TRACE 2" echo "::set-output name=build-dir::${OUTPUT_DIR}" From 6b3dca47355c7e086b08843518849c2bb177bf38 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 22:38:02 +0300 Subject: [PATCH 102/117] No moer set -x --- .github/actions/build-docs/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index f1e6b2a..2007380 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -166,7 +166,6 @@ runs: id: build-docs shell: bash run: | - set -x echo ::group::Build Docs echo "TRACE 1" # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` From 9a408572920f118ebd9be7f43016679e190d8352 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 22:57:39 +0300 Subject: [PATCH 103/117] Check stdout and stderr --- .github/actions/build-docs/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 2007380..64c9e4c 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -170,6 +170,13 @@ runs: echo "TRACE 1" # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` + set -x + + ls -l /dev/stdout + ls -l /dev/stderr + + set +x + build-docs ${{ inputs.asdf-system }} > build-docs.out 2> build-docs.err # echo "TRACE 1_1" From 0044213c5ec50330bcfe5515ec04e3a602dd24b2 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 23:06:11 +0300 Subject: [PATCH 104/117] Wasting time. --- .github/actions/build-docs/action.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 64c9e4c..bb35dc3 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -170,12 +170,17 @@ runs: echo "TRACE 1" # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` - set -x - - ls -l /dev/stdout - ls -l /dev/stderr + cat > test.sh <&1 + echo Bar >&2 + EOF + bash test.sh > out 2> err + + echo TTTTT 1_out + cat out + echo TTTTT 1_err + cat err - set +x build-docs ${{ inputs.asdf-system }} > build-docs.out 2> build-docs.err From aefada013bb9c852bcbcb2c164830f680df22b1d Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 23:20:52 +0300 Subject: [PATCH 105/117] Testing with ros. --- .github/actions/build-docs/action.yml | 32 +++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index bb35dc3..f64070a 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -170,11 +170,35 @@ runs: echo "TRACE 1" # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` - cat > test.sh <&1 - echo Bar >&2 + cat > test.ros < out 2> err + bash test.ros > out 2> err echo TTTTT 1_out cat out From 623233e625d65751eea802469de191c0bda45429 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 23:40:03 +0300 Subject: [PATCH 106/117] Fixed script. --- .github/actions/build-docs/action.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index f64070a..9c6fba5 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -176,11 +176,7 @@ runs: #| exec ros -Q -- $0 "$@" |# - (progn ;;init forms - (ros:ensure-asdf) - #+quicklisp - (ql:quickload '() - :silent t)) + (ros:ensure-asdf) (defpackage :ros.script.build-docs (:use :cl)) @@ -192,12 +188,12 @@ runs: "Standard Foo~%") (format *error-output* "Error Bar~%") - (format *trace-io* + (format *trace-output* "Trace Blah~%") (format *terminal-io* "Terminal Minor~%")) - EOF + bash test.ros > out 2> err echo TTTTT 1_out From 1d0bf371093736b4b263b3e9ea7805b97464f74e Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sat, 6 Feb 2021 23:44:37 +0300 Subject: [PATCH 107/117] Fixed ros script. --- .github/actions/build-docs/action.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 9c6fba5..bbc97cf 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -171,11 +171,6 @@ runs: # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` cat > test.ros < Date: Sat, 6 Feb 2021 23:46:19 +0300 Subject: [PATCH 108/117] Run usiing ros. --- .github/actions/build-docs/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index bbc97cf..5dc1feb 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -189,7 +189,7 @@ runs: "Terminal Minor~%")) EOF - bash test.ros > out 2> err + ros -Q test.ros > out 2> err echo TTTTT 1_out cat out From 8a7365c673cc317678ff0bab2b048792a6497030 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 00:06:12 +0300 Subject: [PATCH 109/117] Use dir. --- .github/actions/build-docs/action.yml | 49 ++++----------------------- 1 file changed, 6 insertions(+), 43 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 5dc1feb..f61fce4 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -170,51 +170,14 @@ runs: echo "TRACE 1" # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` - cat > test.ros < out 2> err - - echo TTTTT 1_out - cat out - echo TTTTT 1_err - cat err - - - build-docs ${{ inputs.asdf-system }} > build-docs.out 2> build-docs.err + if [[ ! -e output.dir ]]; then + echo 'Unable to build docs' + exit 1 + fi - # echo "TRACE 1_1" - # echo ============= - # echo ${OUTPUT_DIR} - # echo ============= - - echo "TRACE 1_out" - echo ============= - cat build-docs.out - echo ============= - - echo "TRACE 1_err" - echo ============= - cat build-docs.err - echo ============= - - OUTPUT_DIR=$(cat build-docs.out) + OUTPUT_DIR=$(cat output.dir) echo "TRACE 2" echo "::set-output name=build-dir::${OUTPUT_DIR}" From 52cea7e5ef3ae80dada9476e5dca25fc3a5d615c Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 00:21:24 +0300 Subject: [PATCH 110/117] Setting github token. --- .github/actions/build-docs/action.yml | 13 +++++++------ .github/workflows/docs.yml | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index f61fce4..792abfd 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -4,6 +4,9 @@ inputs: asdf-system: description: 'ASDF system to build system for' required: true + # github-token: + # description: 'A token needed to push docs to GitHub' + # required: true qlfile-template: description: "Djula template for qlfile. All environment variables are available in it's context" required: false @@ -188,13 +191,11 @@ runs: - name: Upload Docs shell: bash run: | - set -x set -Eeuo pipefail - echo "TRACE 5" echo ::group::Upload Docs - echo "TRACE 6" - BUILD_DIR="${{ steps.build-docs.outputs.build-dir }}" - echo "TRACE 7" + ${{ github.action_path }}/upload.ros "${BUILD_DIR}" - echo "TRACE 8" echo ::endgroup:: + env: + BUILD_DIR: ${{ steps.build-docs.outputs.build-dir }} + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 432ddc9..2b03e80 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,5 +38,6 @@ jobs: - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info +# github-token: ${{ github.token }} NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} SSH_PASS: ${{ secrets.SSH_PASS }} From 48d6ae50ee4591ff2e4e225554744a65a257c572 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 00:36:51 +0300 Subject: [PATCH 111/117] Removed debug code. --- .github/actions/build-docs/action.yml | 169 +------------------------- .github/workflows/docs.yml | 10 +- 2 files changed, 2 insertions(+), 177 deletions(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 792abfd..bc6abc2 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -4,25 +4,9 @@ inputs: asdf-system: description: 'ASDF system to build system for' required: true - # github-token: - # description: 'A token needed to push docs to GitHub' - # required: true qlfile-template: description: "Djula template for qlfile. All environment variables are available in it's context" required: false - # SSH_PASS: - # description: 'Password for SSH session' - # required: true - # NGROK_AUTH_TOKEN: - # description: 'Authentification token for ngrok' - # required: true - # NGROK_REGION: - # description: 'Region for ngrok session' - # required: false - # default: 'us' - # NGROK_TIMEOUT: - # description: 'Timeout in seconds for ngrok session' - # default: 21500 runs: using: composite @@ -39,163 +23,12 @@ runs: qlot exec ros install docs-builder echo ::endgroup:: - # - name: Check inputs - # run: | - # if [ -z "${{ inputs.SSH_PASS }}" ] - # then - # echo "SSH_PASS needs to be passed in the 'with' field." - # exit 1 - # fi - # if [ -z "${{ inputs.NGROK_AUTH_TOKEN }}" ] - # then - # echo "NGROK_AUTH_TOKEN needs to be passed in the 'with' field." - # exit 1 - # fi - # shell: bash - # - name: Meet OS specific prerequisites - # run: | - # if('${{ runner.os }}' -eq 'Linux') - # { - # printf "# Preparing environment..." - # echo "ngrok-stable-linux-386.zip" > ngrok_zip_name - # whoami > ssh_user - # printf " [DONE]\n\n" - - # echo "# Change the SSH user password" - # echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd $(cat ssh_user) - # } - # elseif('${{ runner.os }}' -eq 'macOS') - # { - # printf "# Preparing environment..." - # echo "ngrok-stable-darwin-amd64.zip" > ngrok_zip_name - # echo "root" > ssh_user - # printf " [DONE]\n\n" - - # echo "# Change the SSH user password" - # echo 'PermitRootLogin yes' | sudo tee -a /etc/ssh/sshd_config >/dev/null - # sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist - # sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist - # echo "${{ inputs.SSH_PASS }}`n${{ inputs.SSH_PASS }}" | sudo passwd "root" - # } - # elseif('${{ runner.os }}' -eq 'Windows') - # { - # printf "# Preparing environment..." - # echo "ngrok-stable-windows-amd64.zip" > ngrok_zip_name - # echo $env:UserName > ssh_user - # printf " [DONE]\n\n" - - # echo "# Install SSH server" - # curl https://dl.bitvise.com/BvSshServer-Inst.exe --output BvSshServer-Inst.exe - # .\BvSshServer-Inst.exe -acceptEULA -defaultInstance - - # printf "# Setting up the SSH server to allow access..." - # $cfg = new-object -com "BssCfg815.BssCfg815" - # $cfg.settings.SetDefaults() - # $cfg.settings.access.SetDefaults() - # $cfg.settings.access.winGroups.Clear() - # $cfg.settings.access.winGroups.new.SetDefaults() - # $cfg.settings.access.winGroups.new.loginAllowed = $true - # $cfg.settings.access.winGroups.NewCommit() - # $cfg.settings.Save() - # printf " [DONE]\n\n" - - # echo "# Add Firewall rule to allow inbound TCP connection on local port 22" - # New-NetFirewallRule -Name ngrok -DisplayName 'ngrok' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 - - # echo "# Start the SSH server" - # net start BvSshServer - - # echo "# Change the SSH user password" - # net user $env:UserName ${{ inputs.SSH_PASS }} - # } - # shell: pwsh - - # - name: Install and setup ngrok - # run: | - # echo "# Install ngrok" - # curl https://bin.equinox.io/c/4VmDzA7iaHb/$(cat ngrok_zip_name) --output ngrok.zip - # unzip ngrok.zip - # chmod +x ./ngrok - # echo "# Set ngrok with the given authentification token" - # ./ngrok authtoken ${{ inputs.NGROK_AUTH_TOKEN }} - # shell: bash - - # - name: Start ngrok - # run: | - # set -Eeuo pipefail - # printf "# Starting ngrok..." - # ./ngrok tcp 22 --log ".ngrok.log" --region "${{ inputs.NGROK_REGION }}" & - # printf " [DONE]\n\n" - # printf "# Waiting for '.ngrok.log' file to be properly generated..." - # while ! grep -osqE "tcp://(.+)" .ngrok.log;do - # sleep 1 - # if grep -sq "command failed" .ngrok.log - # then - # exit 1 - # fi - # done - # printf " [DONE]\n\n" - # ssh_string=$(grep -oE "tcp://(.+)" .ngrok.log | sed "s/tcp:\/\//ssh $(cat ssh_user)@/" | sed "s/:/ -p /") - # continue_path=$(eval echo ~$(cat ssh_user)/continue) - # time=${{ inputs.NGROK_TIMEOUT }} - # while [ ! -e $continue_path ] && [ $time -gt 1 ] - # do - # echo "" - # echo "#################" - # echo "# Connect to this runner using:" - # echo "#########################################" - # echo $ssh_string - # echo "#########################################" - # echo "#" - # echo "# Allow workflow to continue using:" - # echo "#########################################" - # echo "bash -c \"touch $continue_path\"" - # echo "#########################################" - # echo "#" - # echo "# SSH session time left:" - # echo "########################################" - # printf '#%-14s%dh:%02dm:%02ds%-14s#\n' '' $(($time/3600)) $(($time%3600/60)) $(($time%60)) '' - # echo "########################################" - # echo "" - - # sleep 10 - # time=$((time-10)) - # done - # echo "# SSH session terminated. Allowing workflow to continue..." - # shell: bash - - - - name: Build Docs - id: build-docs - shell: bash - run: | - echo ::group::Build Docs - echo "TRACE 1" - # OUTPUT_DIR=`build-docs ${{ inputs.asdf-system }}` - - build-docs ${{ inputs.asdf-system }} output.dir - - if [[ ! -e output.dir ]]; then - echo 'Unable to build docs' - exit 1 - fi - - OUTPUT_DIR=$(cat output.dir) - - echo "TRACE 2" - echo "::set-output name=build-dir::${OUTPUT_DIR}" - echo "TRACE 3" - echo ::endgroup:: - echo "TRACE 4" - - name: Upload Docs shell: bash run: | set -Eeuo pipefail echo ::group::Upload Docs - - ${{ github.action_path }}/upload.ros "${BUILD_DIR}" + ${{ github.action_path }}/upload.ros "$(cat output.dir)" echo ::endgroup:: env: - BUILD_DIR: ${{ steps.build-docs.outputs.build-dir }} GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2b03e80..e1729ee 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,16 +28,8 @@ jobs: asdf-system: cl-info qlfile-template: | github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal - # - name: Start SSH session - # uses: luchihoratiu/debug-via-ssh@main - # with: - # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} - # NGROK_REGION: eu - # SSH_PASS: ${{ secrets.SSH_PASS }} - uses: 40ants/cl-info/.github/actions/build-docs@custom-action with: asdf-system: cl-info -# github-token: ${{ github.token }} - NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} - SSH_PASS: ${{ secrets.SSH_PASS }} + From 3d23beecadd5f9a3a4689dd9c370e9081f65c00f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 00:45:22 +0300 Subject: [PATCH 112/117] Returned build docs step. --- .github/actions/build-docs/action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index bc6abc2..7c03453 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -22,13 +22,25 @@ runs: qlot exec ros install docs-builder echo ::endgroup:: + - name: Build Docs + id: build-docs + shell: bash + run: | + set -Eeuo pipefail + echo ::group::Build Docs + + build-docs ${{ inputs.asdf-system }} output.dir + + echo ::endgroup:: - name: Upload Docs shell: bash run: | set -Eeuo pipefail echo ::group::Upload Docs + ${{ github.action_path }}/upload.ros "$(cat output.dir)" + echo ::endgroup:: env: GITHUB_TOKEN: ${{ github.token }} From 8d783374a12a64364687d86785ced4b17129c56f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 00:59:49 +0300 Subject: [PATCH 113/117] Added pushing local changes. --- .github/actions/build-docs/upload.ros | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros index b87e7b0..c9064d3 100755 --- a/.github/actions/build-docs/upload.ros +++ b/.github/actions/build-docs/upload.ros @@ -146,6 +146,27 @@ behaviour could be overriden by keyword argument ``:raise t``." (t (log:info "Everything is up to date."))))) +(defun push-local-changes () + "Some documentation builders, like MGL-PAX, + can update README file as well. In this case, we need + to push the file into the current branch of the repository." + (let ((*current-dir* (probe-file #P""))) + (cond + ((git-repository-was-changed-p) + + (git "add .") + (when (uiop:getenv "GITHUB_ACTIONS") + (log:info "Pushing changes to gh-pages branch") + + (git "config --global user.name \"github-actions[bot]\"") + (git "config --global user.email \"actions@github.com\"")) + (git "commit -m 'Update docs'") + + (git "push")) + ;; or + (t (log:info "There is no local changes."))))) + + (defun main (&rest argv) (log:info "Uploading documentation") @@ -168,6 +189,7 @@ behaviour could be overriden by keyword argument ``:raise t``." docs-dir) :if-exists :overwrite) (declare (ignorable s))) - (push-gh-pages docs-dir)))) + (push-gh-pages docs-dir) + (push-local-changes)))) ;;; vim: set ft=lisp lisp: From e2f8986051f2a7b1eb1fb6dbc3299972e8a10980 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 01:04:04 +0300 Subject: [PATCH 114/117] Added readme.md. --- .github/actions/build-docs/upload.ros | 2 +- README.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 README.md diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros index c9064d3..56d39d0 100755 --- a/.github/actions/build-docs/upload.ros +++ b/.github/actions/build-docs/upload.ros @@ -154,7 +154,7 @@ behaviour could be overriden by keyword argument ``:raise t``." (cond ((git-repository-was-changed-p) - (git "add .") + (git "add -u") (when (uiop:getenv "GITHUB_ACTIONS") (log:info "Pushing changes to gh-pages branch") diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 From 2f6a7970e906bdc1c90604d68b6ac6f75e76b87e Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 01:19:27 +0300 Subject: [PATCH 115/117] Push local changes to head ref. --- .github/actions/build-docs/upload.ros | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros index 56d39d0..cc43bf6 100755 --- a/.github/actions/build-docs/upload.ros +++ b/.github/actions/build-docs/upload.ros @@ -162,7 +162,12 @@ behaviour could be overriden by keyword argument ``:raise t``." (git "config --global user.email \"actions@github.com\"")) (git "commit -m 'Update docs'") - (git "push")) + (cond + ((uiop:getenv "GITHUB_HEAD_REF") + (git "push HEAD:" + (uiop:getenv "GITHUB_HEAD_REF"))) + (t + (git "push")))) ;; or (t (log:info "There is no local changes."))))) From 70623a00514626e03b77fec62205f3e74f2d0413 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 01:33:33 +0300 Subject: [PATCH 116/117] Use origin. --- .github/actions/build-docs/upload.ros | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros index cc43bf6..20edd0b 100755 --- a/.github/actions/build-docs/upload.ros +++ b/.github/actions/build-docs/upload.ros @@ -164,7 +164,7 @@ behaviour could be overriden by keyword argument ``:raise t``." (cond ((uiop:getenv "GITHUB_HEAD_REF") - (git "push HEAD:" + (git "push origin HEAD:" (uiop:getenv "GITHUB_HEAD_REF"))) (t (git "push")))) From 30eab4479d93b0a541e5693a08eb0c86ab9018d5 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 7 Feb 2021 01:44:13 +0300 Subject: [PATCH 117/117] Using separate upstream. --- .github/actions/build-docs/upload.ros | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/build-docs/upload.ros b/.github/actions/build-docs/upload.ros index 20edd0b..0b51454 100755 --- a/.github/actions/build-docs/upload.ros +++ b/.github/actions/build-docs/upload.ros @@ -164,7 +164,10 @@ behaviour could be overriden by keyword argument ``:raise t``." (cond ((uiop:getenv "GITHUB_HEAD_REF") - (git "push origin HEAD:" + + (git "remote add upstream " + (get-origin-to-push)) + (git "push upstream HEAD:" (uiop:getenv "GITHUB_HEAD_REF"))) (t (git "push"))))