From 7d07fdf8c4627c4189ff5ed7f00f51b4bc6d1049 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 11:43:47 +0100 Subject: [PATCH 01/13] Updated pipeline to automatically download and install DIDKit --- .gitea/workflows/ci-pipeline.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 44eece3..1ab4f96 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -24,7 +24,7 @@ jobs: id: install run: | apt-get update - apt-get install python3 python3-venv python3-pip -y + apt-get install python3.11 python3.11-venv python3.11-pip -y - name: Check Python version run: | @@ -39,11 +39,18 @@ jobs: # https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context if: steps.install.outcome == 'success' + - name: Get DIDKit wheel + id: didkit + run: | + wget https://gitea.pangea.org/trustchain-oc1-orchestral/ssikit_trustchain/raw/branch/master/didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl + echo "Successfully downloaded DIDkit" + - name: Install dependencies run: | source venv/bin/activate pip install --upgrade pip pip install -r requirements.txt + if: steps.didkit.outcome == 'success' - name: Run tests run: | From 3f00ea2fa98a464b4a5fef1567e346488a8255ec Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 11:45:18 +0100 Subject: [PATCH 02/13] Added deadsnakes repo to download specific Python version --- .gitea/workflows/ci-pipeline.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 1ab4f96..9f3ed16 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -23,6 +23,7 @@ jobs: - name: Install python3-venv id: install run: | + add-apt-repository ppa:deadsnakes/ppa apt-get update apt-get install python3.11 python3.11-venv python3.11-pip -y From 72d37bc09368472d31b6dd79c82dbddcf87dbbae Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 11:48:50 +0100 Subject: [PATCH 03/13] Installed software-properties-common to be able to use add-apt-repository --- .gitea/workflows/ci-pipeline.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 9f3ed16..e2ba5fc 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -20,12 +20,19 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install pre-requisite packages + id: prereq + run: | + apt-get install software-properties-common + apt-get update + - name: Install python3-venv id: install run: | add-apt-repository ppa:deadsnakes/ppa apt-get update apt-get install python3.11 python3.11-venv python3.11-pip -y + if: steps.prereq.outcome == 'success' - name: Check Python version run: | From 8b4a2936015a4f9903bc612ed78e6f036ab62da3 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 11:50:00 +0100 Subject: [PATCH 04/13] apt-update before installing packages --- .gitea/workflows/ci-pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index e2ba5fc..90c0af2 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -23,8 +23,8 @@ jobs: - name: Install pre-requisite packages id: prereq run: | - apt-get install software-properties-common apt-get update + apt-get install software-properties-common - name: Install python3-venv id: install From 953ca5d5323952cc9acfbfdbd720a6704d7a359f Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 11:50:51 +0100 Subject: [PATCH 05/13] Skip confirmation prompt for package installation --- .gitea/workflows/ci-pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 90c0af2..a57c0c0 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -24,7 +24,7 @@ jobs: id: prereq run: | apt-get update - apt-get install software-properties-common + apt-get install software-properties-common -y - name: Install python3-venv id: install From 91f781d85e388bace30c367c3c2ff6bd62ec6e50 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 12:05:45 +0100 Subject: [PATCH 06/13] Add debugging step --- .gitea/workflows/ci-pipeline.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index a57c0c0..945da52 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -20,6 +20,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Check version and distribution + run: | + uname -srm + lsb_release -a + - name: Install pre-requisite packages id: prereq run: | From e8ae5047cb7252099a779ac6339263b88dc57f74 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 12:07:14 +0100 Subject: [PATCH 07/13] Fix debugging step --- .gitea/workflows/ci-pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 945da52..2f091ec 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -23,7 +23,7 @@ jobs: - name: Check version and distribution run: | uname -srm - lsb_release -a + cat /etc/os-release - name: Install pre-requisite packages id: prereq From 0d864490df8b0a047d3559b55ed903070bcc68f3 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 12:39:20 +0100 Subject: [PATCH 08/13] Try renaming the wheel to work with the current python version --- .gitea/workflows/ci-pipeline.yaml | 16 +++++++--------- requirements.txt | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 2f091ec..dedba16 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -25,19 +25,17 @@ jobs: uname -srm cat /etc/os-release - - name: Install pre-requisite packages - id: prereq - run: | - apt-get update - apt-get install software-properties-common -y + #- name: Install pre-requisite packages + #id: prereq + #run: | + #apt-get update + #apt-get install software-properties-common -y - name: Install python3-venv id: install run: | - add-apt-repository ppa:deadsnakes/ppa apt-get update - apt-get install python3.11 python3.11-venv python3.11-pip -y - if: steps.prereq.outcome == 'success' + apt-get install python3 python3-venv python3-pip -y - name: Check Python version run: | @@ -55,7 +53,7 @@ jobs: - name: Get DIDKit wheel id: didkit run: | - wget https://gitea.pangea.org/trustchain-oc1-orchestral/ssikit_trustchain/raw/branch/master/didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl + wget -O didkit-0.3.2-cp39-cp39-manylinux_2_34_x86_64.whl https://gitea.pangea.org/trustchain-oc1-orchestral/ssikit_trustchain/raw/branch/master/didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl echo "Successfully downloaded DIDkit" - name: Install dependencies diff --git a/requirements.txt b/requirements.txt index 27dd8c6..64ea3d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,4 +27,4 @@ uharfbuzz==0.38.0 fontTools==4.47.0 weasyprint==60.2 ujson==5.9.0 -./didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl +./didkit-0.3.2-cp39-cp39-manylinux_2_34_x86_64.whl From d3228a63a14e21e5bfa0112018fa277e87c61961 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 12:47:39 +0100 Subject: [PATCH 09/13] Test --- .gitea/workflows/ci-pipeline.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index dedba16..2dc5b28 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -40,7 +40,6 @@ jobs: - name: Check Python version run: | python3 --version - echo "Python version: $(python3 --version)" - name: Create virtual environment run: | From a5696a5cc18ebbdd3e0de5f1cb15242ee37105a5 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 12:51:46 +0100 Subject: [PATCH 10/13] Add debugging logs to failing step --- .gitea/workflows/ci-pipeline.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 2dc5b28..96b35e3 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -58,7 +58,11 @@ jobs: - name: Install dependencies run: | source venv/bin/activate + which python + pip -V pip install --upgrade pip + pip -V + python -V pip install -r requirements.txt if: steps.didkit.outcome == 'success' From 26c226f57b543da82b459c44267daa77c64f673b Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 13:08:52 +0100 Subject: [PATCH 11/13] Test with a manual edit of the .runner file --- .gitea/workflows/ci-pipeline.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 96b35e3..5d04e62 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -25,12 +25,6 @@ jobs: uname -srm cat /etc/os-release - #- name: Install pre-requisite packages - #id: prereq - #run: | - #apt-get update - #apt-get install software-properties-common -y - - name: Install python3-venv id: install run: | From 6f262a716048b162bc688b75a4f78d861a6555ab Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 25 Jan 2024 13:24:16 +0100 Subject: [PATCH 12/13] Restore original wheel name --- .gitea/workflows/ci-pipeline.yaml | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 5d04e62..5ee602a 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -46,7 +46,7 @@ jobs: - name: Get DIDKit wheel id: didkit run: | - wget -O didkit-0.3.2-cp39-cp39-manylinux_2_34_x86_64.whl https://gitea.pangea.org/trustchain-oc1-orchestral/ssikit_trustchain/raw/branch/master/didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl + wget https://gitea.pangea.org/trustchain-oc1-orchestral/ssikit_trustchain/raw/branch/master/didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl echo "Successfully downloaded DIDkit" - name: Install dependencies diff --git a/requirements.txt b/requirements.txt index 64ea3d8..27dd8c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,4 +27,4 @@ uharfbuzz==0.38.0 fontTools==4.47.0 weasyprint==60.2 ujson==5.9.0 -./didkit-0.3.2-cp39-cp39-manylinux_2_34_x86_64.whl +./didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl From 3a234a2e4e47aca03890e73ce0b6225418b4dc5e Mon Sep 17 00:00:00 2001 From: Elijah Date: Wed, 31 Jan 2024 09:48:50 +0100 Subject: [PATCH 13/13] Fixed job runner tag for correct job yaml --- .gitea/workflows/ci-pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index 5ee602a..a39158c 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -10,7 +10,7 @@ on: jobs: test: - runs-on: ubuntu-22.04 + runs-on: self-hosted env: SECRET_KEY: "t3st-dummy-s3cr3t-k3y"