diff --git a/.circleci/config.yml b/.circleci/config.yml index b00aceae7a..fa579164ad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,19 @@ version: 2.1 +parameters: + GHA_Actor: + type: string + default: "" + GHA_Action: + type: string + default: "" + GHA_Event: + type: string + default: "" + GHA_Meta: + type: string + default: "" + setup-env: &setup-env MSRV: 1.70.0 RUSTFLAGS: "-Dwarnings" @@ -8,16 +22,11 @@ setup-env: &setup-env RUST_LOG: info executors: - arm64: + linux: machine: image: ubuntu-2004:202101-01 working_directory: ~/lurk - resource_class: arm.xlarge - darwin: - macos: - xcode: "14.3.1" - working_directory: ~/lurk - resource_class: macos.m1.large.gen1 + resource_class: large commands: set_env_path: @@ -96,6 +105,7 @@ commands: jobs: test: + when: << pipeline.parameters.GHA_Action >> parameters: os: type: executor @@ -134,7 +144,7 @@ workflows: - test: matrix: parameters: - os: [arm64, darwin] + os: [linux] filters: branches: ignore: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 433de66a97..c551624980 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,193 +33,182 @@ concurrency: cancel-in-progress: true jobs: - linux: - runs-on: [self-hosted, test] - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci - - name: Linux Gadget Tests w/o debug assertions - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' - - # 4 vCPU, 16 GB RAM, $0.008/min - linux-buildjet-small: - runs-on: buildjet-4vcpu-ubuntu-2204 - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci - - name: Linux Gadget Tests w/o debug assertions - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' + #linux: + #runs-on: [self-hosted, test] + #env: + #RUSTFLAGS: -D warnings + #steps: + #- uses: actions/checkout@v4 + #with: + #submodules: recursive + #- uses: actions-rs/toolchain@v1 + #- uses: taiki-e/install-action@nextest + #- uses: Swatinem/rust-cache@v2 + #- name: Linux Tests + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-ci + #- name: Linux Gadget Tests w/o debug assertions + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' - # 8 vCPU, 32 GB RAM, $0.016/min - linux-buildjet-medium: - runs-on: buildjet-8vcpu-ubuntu-2204 - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci - - name: Linux Gadget Tests w/o debug assertions - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' - - # 16 vCPU, 64 GB RAM, $0.032/min - linux-buildjet-large: - runs-on: buildjet-16vcpu-ubuntu-2204 - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci - - name: Linux Gadget Tests w/o debug assertions - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' + ## 4 vCPU, 16 GB RAM, $0.008/min + #linux-buildjet-small: + #runs-on: buildjet-4vcpu-ubuntu-2204 + #env: + #RUSTFLAGS: -D warnings + #steps: + #- uses: actions/checkout@v4 + #with: + #submodules: recursive + #- uses: actions-rs/toolchain@v1 + #- uses: taiki-e/install-action@nextest + #- uses: Swatinem/rust-cache@v2 + #- name: Linux Tests + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-ci + #- name: Linux Gadget Tests w/o debug assertions + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' + ## 8 vCPU, 32 GB RAM, $0.016/min + #linux-buildjet-medium: + #runs-on: buildjet-8vcpu-ubuntu-2204 + #env: + #RUSTFLAGS: -D warnings + #steps: + #- uses: actions/checkout@v4 + #with: + #submodules: recursive + #- uses: actions-rs/toolchain@v1 + #- uses: taiki-e/install-action@nextest + #- uses: Swatinem/rust-cache@v2 + #- name: Linux Tests + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-ci + #- name: Linux Gadget Tests w/o debug assertions + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' - # 4 vCPU, 6 GB RAM, $0.008/min - linux-buildjet-arm-small: - runs-on: buildjet-4vcpu-ubuntu-2204-arm - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci - - name: Linux Gadget Tests w/o debug assertions - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' + ## 16 vCPU, 64 GB RAM, $0.032/min + #linux-buildjet-large: + #runs-on: buildjet-16vcpu-ubuntu-2204 + #env: + #RUSTFLAGS: -D warnings + #steps: + #- uses: actions/checkout@v4 + #with: + #submodules: recursive + #- uses: actions-rs/toolchain@v1 + #- uses: taiki-e/install-action@nextest + #- uses: Swatinem/rust-cache@v2 + #- name: Linux Tests + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-ci + #- name: Linux Gadget Tests w/o debug assertions + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' - # 8 vCPU, 12 GB RAM, $0.016/min - linux-buildjet-arm-medium: - runs-on: buildjet-8vcpu-ubuntu-2204-arm - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci - - name: Linux Gadget Tests w/o debug assertions - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' + ## 16 vCPU, 24 GB RAM, $0.032/min + #linux-buildjet-arm-large: + #runs-on: buildjet-16vcpu-ubuntu-2204-arm + #env: + #RUSTFLAGS: -D warnings + #steps: + #- uses: actions/checkout@v4 + #with: + #submodules: recursive + #- uses: actions-rs/toolchain@v1 + #- uses: taiki-e/install-action@nextest + #- uses: Swatinem/rust-cache@v2 + #- name: Linux Tests + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-ci + #- name: Linux Gadget Tests w/o debug assertions + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' - # 16 vCPU, 24 GB RAM, $0.032/min - linux-buildjet-arm-large: - runs-on: buildjet-16vcpu-ubuntu-2204-arm - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci - - name: Linux Gadget Tests w/o debug assertions - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' + ## 32 vCPU, 36 GB RAM, $0.048/min + #linux-buildjet-arm-large: + #runs-on: buildjet-16vcpu-ubuntu-2204-arm + #env: + #RUSTFLAGS: -D warnings + #steps: + #- uses: actions/checkout@v4 + #with: + #submodules: recursive + #- uses: actions-rs/toolchain@v1 + #- uses: taiki-e/install-action@nextest + #- uses: Swatinem/rust-cache@v2 + #- name: Linux Tests + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-ci + #- name: Linux Gadget Tests w/o debug assertions + #run: | + #cargo nextest run --profile ci --workspace --cargo-profile dev-no-assertions -E 'test(circuit::gadgets)' - misc: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - fail-fast: false - env: - RUSTFLAGS: -D warnings - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - run: rustup target add wasm32-unknown-unknown - - name: Wasm build - run: | - cargo build --target wasm32-unknown-unknown - # make sure benches don't bit-rot - - name: build benches - # TODO: --all-features - run: cargo build --benches - - name: Doctests - run: | - cargo test --doc --workspace --profile dev-ci + #misc: + #runs-on: ${{ matrix.os }} + #strategy: + #matrix: + #os: + #- ubuntu-latest + #fail-fast: false + #env: + #RUSTFLAGS: -D warnings + #steps: + #- uses: actions/checkout@v4 + #- uses: actions-rs/toolchain@v1 + #- uses: taiki-e/install-action@nextest + #- uses: Swatinem/rust-cache@v2 + #- run: rustup target add wasm32-unknown-unknown + #- name: Wasm build + #run: | + #cargo build --target wasm32-unknown-unknown + ## make sure benches don't bit-rot + #- name: build benches + ## TODO: --all-features + #run: cargo build --benches + #- name: Doctests + #run: | + #cargo test --doc --workspace --profile dev-ci - clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - components: rustfmt, clippy - - uses: Swatinem/rust-cache@v2 - # See '.cargo/config' for list of enabled/disabled clippy lints - - name: rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all --check - - name: cargo clippy - run: cargo xclippy -D warnings + #clippy: + #runs-on: ubuntu-latest + #steps: + #- uses: actions/checkout@v4 + #- uses: actions-rs/toolchain@v1 + #with: + #components: rustfmt, clippy + #- uses: Swatinem/rust-cache@v2 + ## See '.cargo/config' for list of enabled/disabled clippy lints + #- name: rustfmt + #uses: actions-rs/cargo@v1 + #with: + #command: fmt + #args: --all --check + #- name: cargo clippy + #run: cargo xclippy -D warnings - msrv: + #msrv: + #runs-on: ubuntu-latest + #steps: + #- uses: actions/checkout@v4 + #- name: Install rustup + #uses: actions-rs/toolchain@v1 + #with: + #toolchain: stable + #override: true + #- uses: Swatinem/rust-cache@v2 + #- name: Install cargo-msrv + #run: cargo install cargo-msrv + #- name: Check Rust MSRV + #run: cargo msrv verify + + m1-mac-circleci: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Install rustup - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - - name: Install cargo-msrv - run: cargo install cargo-msrv - - name: Check Rust MSRV - run: cargo msrv verify + - name: Trigger CircleCI M1 Mac workflow + id: mac-circleci + uses: circleci/trigger_circleci_pipeline@v1.0 + env: + CCI_TOKEN: ${{ secrets.CIRCLECI_API_TOKEN }}