diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69e9979e..d75fdf2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,19 +12,16 @@ jobs: build: name: ${{ matrix.friendlyName }} env: - DISPLAY: ":99.0" 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: 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 @@ -40,12 +37,11 @@ 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 \ - python-gnomekeyring - if: ${{ matrix.os == 'ubuntu-16.04' }} + 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: @@ -64,20 +60,20 @@ jobs: name: Build native module from source - run: | - echo "Initialize dbus..." - export NO_AT_BRIDGE=1; + echo "Install keyring..." + pip3 install --upgrade pip + pip3 install keyring + echo "Prepare D-Bus session..." 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 gnomekeyring;gnomekeyring.create_sync('login', '');" + python -c "import keyring;keyring.set_password('system', 'login', 'pwd');" 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 @@ -85,7 +81,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' }} @@ -97,7 +93,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: |