mirror of
https://github.com/unode/firefox_decrypt.git
synced 2025-12-16 12:01:52 +01:00
96 lines
2.9 KiB
YAML
96 lines
2.9 KiB
YAML
name: Test firefox_decrypt
|
|
on: [workflow_dispatch, push]
|
|
|
|
jobs:
|
|
test-firefox:
|
|
runs-on: ${{ matrix.os }}-latest
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
os: [ubuntu, macos, windows]
|
|
# pypy3 not yet up to speed with py3.9 typing hints
|
|
# python-version: [3.9, 3.10.0-alpha.6, pypy3]
|
|
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
|
|
nss-source: ['latest-esr', 'latest', 'NSS_3_117_RTM', 'NSS_3_112_2_RTM', 'system']
|
|
exclude:
|
|
- os: macos
|
|
nss-source: NSS_3_117_RTM
|
|
- os: macos
|
|
nss-source: NSS_3_112_2_RTM
|
|
- os: macos
|
|
nss-source: latest
|
|
- os: macos
|
|
nss-source: latest-esr
|
|
- os: windows
|
|
nss-source: NSS_3_117_RTM
|
|
- os: windows
|
|
nss-source: NSS_3_112_2_RTM
|
|
- os: windows
|
|
nss-source: system
|
|
env:
|
|
# Needed to force UTF-8 and have consistent behavior in Windows
|
|
PYTHONUTF8: 1
|
|
# Compile NSS for Linux 64 bits
|
|
USE_64: 1
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Setup Firefox ${{ matrix.firefox }}
|
|
if: |
|
|
startsWith(matrix.nss-source, 'latest') && (
|
|
matrix.os == 'ubuntu' || matrix.os == 'windows'
|
|
)
|
|
uses: browser-actions/setup-firefox@latest
|
|
with:
|
|
firefox-version: ${{ matrix.firefox }}
|
|
|
|
- name: Install nss via homebrew
|
|
if: |
|
|
(matrix.os == 'macos' && matrix.nss-source == 'system')
|
|
run: |
|
|
brew install nss
|
|
brew list --versions nss
|
|
|
|
- name: Cache NSS built from source
|
|
id: cache-nss
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
nss-${{ matrix.nss-source }}
|
|
nspr
|
|
dist
|
|
key: ${{ matrix.nss-source }}-${{ matrix.os }}
|
|
|
|
- name: Build NSS from source
|
|
if: |
|
|
(
|
|
startsWith(matrix.nss-source, 'NSS') && matrix.os == 'ubuntu' && steps.cache-nss.outputs.cache-hit != 'true'
|
|
)
|
|
run: |
|
|
apt update && apt install -y mercurial git ninja-build python3-pip
|
|
python3 -m pip install gyp-next
|
|
hg clone https://hg.mozilla.org/projects/nspr
|
|
wget https://hg.mozilla.org/projects/nss/archive/${{ matrix.nss-source }}.zip
|
|
unzip ${{ matrix.nss-source }}.zip
|
|
cd nss-${{ matrix.nss-source }}
|
|
./build.sh
|
|
|
|
- name: Prepare system-level lib resolution
|
|
if: |
|
|
(
|
|
startsWith(matrix.nss-source, 'NSS') && matrix.os == 'ubuntu'
|
|
)
|
|
run: |
|
|
echo "${{ github.workspace }}/dist/Debug/lib" > /etc/ld.so.conf.d/nss-libs.conf
|
|
ldconfig
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd tests
|
|
python show_encodings
|
|
python run_all -v
|