From f587a050e97b3bd76258df15bfe00d612731c53f Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Mon, 4 Mar 2024 14:38:29 +0100 Subject: [PATCH] Add a GitHub Actions main workflow and fix the build (#9) --- .github/workflows/main.yml | 51 ++++++++++++++++++++++++++++++++++++++ Cargo.lock | 1 + Cargo.toml | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..aafc8d0e84 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,51 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + workflow_dispatch: + merge_group: + types: [checks_requested] + + +jobs: + linux-debug: + name: Linux (Debug) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run Tests + run: cargo build --features servo + env: + RUST_BACKTRACE: 1 + + linux-release: + name: Linux (Release) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run Tests + run: cargo build --release --features servo + env: + RUST_BACKTRACE: 1 + + build-result: + name: Result + runs-on: ubuntu-latest + if: ${{ always() }} + needs: + - linux-debug + - linux-release + steps: + - name: Success + if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} + run: exit 0 + - name: Failure + if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} + run: exit 1 + diff --git a/Cargo.lock b/Cargo.lock index f25fdad746..8bce867f8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1585,6 +1585,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 6cde60f64f..ee04ba9c50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,7 +113,7 @@ tokio-rustls = "0.24" tungstenite = "0.20" unicode-bidi = "0.3.15" unicode-script = "0.5" -url = "2.5" +url = { version = "2.5", features = ["serde"] } uuid = { version = "1.7.0", features = ["v4"] } webdriver = "0.49.0" webpki = "0.22"