Skip to content

Commit

Permalink
Merge pull request #1718 from freedomofpress/proxy-rusting
Browse files Browse the repository at this point in the history
Implement proxy v2 architecture, in Rust
  • Loading branch information
zenmonkeykstop committed May 17, 2024
2 parents 561e31b + caabec2 commit 9e56263
Show file tree
Hide file tree
Showing 231 changed files with 42,302 additions and 36,915 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
PKG_DIR=../client make -C securedrop-builder requirements
PKG_DIR=../export make -C securedrop-builder requirements
PKG_DIR=../log make -C securedrop-builder requirements
PKG_DIR=../proxy make -C securedrop-builder requirements
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git diff --ignore-matching-lines=# --exit-code
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,13 @@ jobs:
strategy:
fail-fast: false
matrix:
# proxy has no `make lint` because it is covered by `rust-lint`.
component:
- client
- export
- log
- proxy
debian_version:
- bookworm
# bookworm jobs are failing and will be
# replaced with proxy v2 shortly, so skip
# https://github.com/freedomofpress/securedrop-client/issues/1681
exclude:
- component: proxy
debian_version: bookworm
runs-on: ubuntu-latest
container: debian:${{ matrix.debian_version }}
steps:
Expand Down Expand Up @@ -113,6 +107,12 @@ jobs:
container: rust:1.74.1
steps:
- uses: actions/checkout@v4
- name: Configure Qubes repository
run: |
cp scripts/qubes_42.sources /etc/apt/sources.list.d/
source /etc/os-release
sed -i s/##VERSION_CODENAME##/${VERSION_CODENAME}/ /etc/apt/sources.list.d/qubes_42.sources
apt-get update && apt-get install --yes libclang-dev qubesdb-dev
- name: Install dependencies
run: |
rustup component add rustfmt
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ jobs:
# Wait for server to come up
dockerize -wait http://127.0.0.1:8080 -timeout 5m
# Run tests
rm client/tests/sdk/data/*.yml
make -C client test-sdk
make -C client regenerate-sdk-cassettes
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
- proxy
debian_version:
- bookworm
# bookworm jobs are failing and will be
# replaced with proxy v2 shortly, so skip
# https://github.com/freedomofpress/securedrop-client/issues/1681
exclude:
- component: proxy
debian_version: bookworm
runs-on: ubuntu-latest
container: debian:${{ matrix.debian_version }}
steps:
Expand All @@ -41,13 +35,20 @@ jobs:
run: |
# We want to run tests as a regular user, similar to Qubes VMs
useradd --create-home --shell /bin/bash user
- name: Install Rust-specific dependencies
run: apt-get install --yes build-essential curl libssl-dev pkg-config
if: ${{ matrix.component == 'proxy' }}
- uses: actions/checkout@v4
# Install Rust 1.74.1, keep in sync with rust-toolchain.toml
- uses: dtolnay/[email protected]
if: ${{ matrix.component == 'proxy' }}
- name: Install dependencies
run: |
sudo -u user poetry -C ${{ matrix.component }} install
- name: Run test
run: |
sudo chown -R user:user .
sudo -u user make -C ${{ matrix.component }} test
sudo -u user PATH=$PATH:$HOME/.cargo/bin make -C ${{ matrix.component }} test
# Run the various `make test-...` commands for the client.
# TODO: these should be consolidated into one when feasible
Expand All @@ -71,6 +72,7 @@ jobs:
run: |
# We want to run tests as a regular user, similar to Qubes VMs
useradd --create-home --shell /bin/bash user
sudo -u user bash -c "mkdir ~/Downloads"
- name: Install dependencies
run: |
make -C client ci-install-deps
Expand Down
Loading

0 comments on commit 9e56263

Please sign in to comment.