From 1f64fcd249363d9ed73860ee744622c8167741ff Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 10:19:57 +0100 Subject: [PATCH 01/12] Don't specify SDKROOT for macOS CI builds anymore --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69e9979e..70ce3029 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,6 @@ jobs: CC: "clang" CXX: "clang++" npm_config_clang: "1" - # Needed until macos-11.0 hosted runners are available - SDKROOT: "/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk" strategy: matrix: From ce19543c593aab60e18f82d3562f3bb2458f75e8 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 10:31:37 +0100 Subject: [PATCH 02/12] Bump Ubuntu runner to 20.04 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70ce3029..78ebd0d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,9 @@ jobs: strategy: matrix: node-version: [15.x] - os: [ubuntu-16.04, windows-latest, macos-latest] + os: [ubuntu-20.04, windows-latest, macos-latest] include: - - os: ubuntu-16.04 + - os: ubuntu-20.04 friendlyName: Ubuntu - os: windows-latest friendlyName: Windows From f824d024a1284da63f26db4fab740aac33ac81be Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 10:32:55 +0100 Subject: [PATCH 03/12] Now bump it in all checks --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78ebd0d1..b6d6f1a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: libsecret-1-dev \ dbus-x11 \ python-gnomekeyring - if: ${{ matrix.os == 'ubuntu-16.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} name: Install additional dependencies # This step can be removed as soon as official Windows arm64 builds are published: @@ -71,11 +71,11 @@ jobs: echo "Create a test key using script..." python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');" npm test - if: ${{ matrix.os == 'ubuntu-16.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} name: Run tests (Linux) - run: npm test - if: ${{ matrix.os != 'ubuntu-16.04' }} + if: ${{ matrix.os != 'ubuntu-20.04' }} name: Run tests (Windows/macOS) - run: npm run prebuild-napi-x64 @@ -83,7 +83,7 @@ jobs: - run: npm run prebuild-napi-arm64 name: Prebuild (arm64) - if: ${{ matrix.os != 'ubuntu-16.04' }} + if: ${{ matrix.os != 'ubuntu-20.04' }} - run: npm run prebuild-napi-ia32 if: ${{ matrix.os == 'windows-latest' }} @@ -95,7 +95,7 @@ jobs: docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-napi-ia32 && rm -rf build" docker build -t node-keytar/arm64-cross-compile docker/arm64-cross-compile docker run --rm -v ${PWD}:/project node-keytar/arm64-cross-compile /bin/bash -c "cd /project && npm run prebuild-napi-arm64" - if: ${{ matrix.os == 'ubuntu-16.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} name: Prebuild (Linux x86 + ARM64) - run: | From 613471921b172dbc9fecc6ab47dbe9b713f4d124 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 10:43:31 +0100 Subject: [PATCH 04/12] Replace python-gnomekeyring with python-keyring --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6d6f1a0..1451e88b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: gnome-keyring \ libsecret-1-dev \ dbus-x11 \ - python-gnomekeyring + python-keyring if: ${{ matrix.os == 'ubuntu-20.04' }} name: Install additional dependencies @@ -69,7 +69,7 @@ jobs: eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login) eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) echo "Create a test key using script..." - python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');" + python -c "import keyring;keyring.set_password('system', 'login', '');" npm test if: ${{ matrix.os == 'ubuntu-20.04' }} name: Run tests (Linux) From 16b11e7e1593570981eadf9978a52095d11e50ff Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 10:49:28 +0100 Subject: [PATCH 05/12] Another a temp to run Linux tests... --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1451e88b..379c4877 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,11 +63,9 @@ jobs: - run: | echo "Initialize dbus..." - export NO_AT_BRIDGE=1; - eval $(dbus-launch --sh-syntax); + eval $(dbus-launch -- sh); echo "Unlocking the keyring..." - eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login) - eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) + eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --unlock) echo "Create a test key using script..." python -c "import keyring;keyring.set_password('system', 'login', '');" npm test From 45d2d1065e73c5d0f7e3a3a924dc2d0b82cd6f1a Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 10:51:12 +0100 Subject: [PATCH 06/12] Another attempt to fix Linux CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 379c4877..dd7c3b51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,7 @@ jobs: eval $(dbus-launch -- sh); echo "Unlocking the keyring..." eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --unlock) + eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) echo "Create a test key using script..." python -c "import keyring;keyring.set_password('system', 'login', '');" npm test From c138cfe6deecb371c566eaecce754d91095fe6e9 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 10:53:02 +0100 Subject: [PATCH 07/12] Another attempt to fix Linux CI --- .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 dd7c3b51..bcc46fe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: - run: | echo "Initialize dbus..." - eval $(dbus-launch -- sh); + eval $(dbus-run-session -- sh); echo "Unlocking the keyring..." eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --unlock) eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) From a02f1984d4736afb023b43b69721bab7034eea92 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 11:47:22 +0100 Subject: [PATCH 08/12] Another attempt to fix Linux CI --- .github/workflows/ci.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcc46fe6..0ec57ece 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,9 @@ jobs: strategy: matrix: node-version: [15.x] - os: [ubuntu-20.04, windows-latest, macos-latest] + os: [ubuntu-18.04, windows-latest, macos-latest] include: - - os: ubuntu-20.04 + - os: ubuntu-18.04 friendlyName: Ubuntu - os: windows-latest friendlyName: Windows @@ -42,8 +42,8 @@ jobs: gnome-keyring \ libsecret-1-dev \ dbus-x11 \ - python-keyring - if: ${{ matrix.os == 'ubuntu-20.04' }} + python-gnomekeyring + if: ${{ matrix.os == 'ubuntu-18.04' }} name: Install additional dependencies # This step can be removed as soon as official Windows arm64 builds are published: @@ -63,18 +63,19 @@ jobs: - run: | echo "Initialize dbus..." - eval $(dbus-run-session -- sh); + export NO_AT_BRIDGE=1; + eval $(dbus-launch --sh-syntax); echo "Unlocking the keyring..." - eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --unlock) + eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login) eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) echo "Create a test key using script..." - python -c "import keyring;keyring.set_password('system', 'login', '');" + python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');" npm test - if: ${{ matrix.os == 'ubuntu-20.04' }} + if: ${{ matrix.os == 'ubuntu-18.04' }} name: Run tests (Linux) - run: npm test - if: ${{ matrix.os != 'ubuntu-20.04' }} + if: ${{ matrix.os != 'ubuntu-18.04' }} name: Run tests (Windows/macOS) - run: npm run prebuild-napi-x64 @@ -82,7 +83,7 @@ jobs: - run: npm run prebuild-napi-arm64 name: Prebuild (arm64) - if: ${{ matrix.os != 'ubuntu-20.04' }} + if: ${{ matrix.os != 'ubuntu-18.04' }} - run: npm run prebuild-napi-ia32 if: ${{ matrix.os == 'windows-latest' }} @@ -94,7 +95,7 @@ jobs: docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-napi-ia32 && rm -rf build" docker build -t node-keytar/arm64-cross-compile docker/arm64-cross-compile docker run --rm -v ${PWD}:/project node-keytar/arm64-cross-compile /bin/bash -c "cd /project && npm run prebuild-napi-arm64" - if: ${{ matrix.os == 'ubuntu-20.04' }} + if: ${{ matrix.os == 'ubuntu-18.04' }} name: Prebuild (Linux x86 + ARM64) - run: | From c3e6bd4be8efae326762844b354e93038a018bb1 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 11:48:06 +0100 Subject: [PATCH 09/12] Another attempt to fix Linux CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ec57ece..51cee184 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: gnome-keyring \ libsecret-1-dev \ dbus-x11 \ - python-gnomekeyring + python-keyring if: ${{ matrix.os == 'ubuntu-18.04' }} name: Install additional dependencies @@ -69,7 +69,7 @@ jobs: eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login) eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) echo "Create a test key using script..." - python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');" + python -c "import keyring;keyring.set_password('system', 'login', '');" npm test if: ${{ matrix.os == 'ubuntu-18.04' }} name: Run tests (Linux) From a1600e68a4a090589d40cbf504d7979786bd4fc6 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 12:13:32 +0100 Subject: [PATCH 10/12] Another attempt to fix Linux CI --- .github/workflows/ci.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51cee184..91f59ca6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,9 @@ jobs: strategy: matrix: node-version: [15.x] - os: [ubuntu-18.04, windows-latest, macos-latest] + os: [ubuntu-20.04, windows-latest, macos-latest] include: - - os: ubuntu-18.04 + - os: ubuntu-20.04 friendlyName: Ubuntu - os: windows-latest friendlyName: Windows @@ -42,8 +42,9 @@ jobs: gnome-keyring \ libsecret-1-dev \ dbus-x11 \ - python-keyring - if: ${{ matrix.os == 'ubuntu-18.04' }} + python3-venv \ + python3-dev + if: ${{ matrix.os == 'ubuntu-20.04' }} name: Install additional dependencies # This step can be removed as soon as official Windows arm64 builds are published: @@ -62,20 +63,20 @@ jobs: name: Build native module from source - run: | - echo "Initialize dbus..." - export NO_AT_BRIDGE=1; + python3 -m venv venv + source venv/bin/activate + pip3 install --upgrade pip + pip3 install keyring eval $(dbus-launch --sh-syntax); - echo "Unlocking the keyring..." - eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login) - eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) + eval $(echo 'somecredstorepass' | gnome-keyring-daemon --unlock) echo "Create a test key using script..." - python -c "import keyring;keyring.set_password('system', 'login', '');" + python -c "import keyring;keyring.set_password('system', 'login', 'pwd');" npm test - if: ${{ matrix.os == 'ubuntu-18.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} name: Run tests (Linux) - run: npm test - if: ${{ matrix.os != 'ubuntu-18.04' }} + if: ${{ matrix.os != 'ubuntu-20.04' }} name: Run tests (Windows/macOS) - run: npm run prebuild-napi-x64 @@ -83,7 +84,7 @@ jobs: - run: npm run prebuild-napi-arm64 name: Prebuild (arm64) - if: ${{ matrix.os != 'ubuntu-18.04' }} + if: ${{ matrix.os != 'ubuntu-20.04' }} - run: npm run prebuild-napi-ia32 if: ${{ matrix.os == 'windows-latest' }} @@ -95,7 +96,7 @@ jobs: docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-napi-ia32 && rm -rf build" docker build -t node-keytar/arm64-cross-compile docker/arm64-cross-compile docker run --rm -v ${PWD}:/project node-keytar/arm64-cross-compile /bin/bash -c "cd /project && npm run prebuild-napi-arm64" - if: ${{ matrix.os == 'ubuntu-18.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} name: Prebuild (Linux x86 + ARM64) - run: | From 5856bb4b5bc2d01f4c50efa893a64f972472b2a3 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 12:17:19 +0100 Subject: [PATCH 11/12] Another attempt to fix Linux CI --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91f59ca6..a4c95f44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,6 @@ jobs: gnome-keyring \ libsecret-1-dev \ dbus-x11 \ - python3-venv \ python3-dev if: ${{ matrix.os == 'ubuntu-20.04' }} name: Install additional dependencies @@ -63,10 +62,10 @@ jobs: name: Build native module from source - run: | - python3 -m venv venv - source venv/bin/activate + echo "Install keyring..." pip3 install --upgrade pip pip3 install keyring + echo "Prepare D-Bus session..." eval $(dbus-launch --sh-syntax); eval $(echo 'somecredstorepass' | gnome-keyring-daemon --unlock) echo "Create a test key using script..." From 34428373d42a1b592be75327c67197cc3e49bfdd Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Tue, 1 Feb 2022 12:21:04 +0100 Subject: [PATCH 12/12] Another attempt to fix Linux CI --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4c95f44..d75fdf2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ jobs: build: name: ${{ matrix.friendlyName }} env: - DISPLAY: ":99.0" CC: "clang" CXX: "clang++" npm_config_clang: "1" @@ -38,8 +37,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: | - sudo apt-get install xvfb \ - gnome-keyring \ + sudo apt-get install gnome-keyring \ libsecret-1-dev \ dbus-x11 \ python3-dev