diff --git a/.github/workflows/0-6-lint-splinter.yaml b/.github/workflows/0-6-lint-splinter.yaml deleted file mode 100644 index 6f94f3e04..000000000 --- a/.github/workflows/0-6-lint-splinter.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: 0-6 Lint Splinter - -on: - pull_request: - -env: - CARGO_TERM_COLOR: always - -concurrency: - group: "${{ github.ref }}-${{ github.workflow }}" - cancel-in-progress: true - -jobs: - lint_splinter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Display envvars - run: env - - - name: Install Just - run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin - - - name: Run Lint/Clippy on Splinter - run: just ci-lint-splinter diff --git a/.github/workflows/0-6-unit-test-splinter.yaml b/.github/workflows/0-6-unit-test-splinter.yaml deleted file mode 100644 index 29be5e072..000000000 --- a/.github/workflows/0-6-unit-test-splinter.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: 0-6 Unit Test Splinter - -on: - pull_request: - -env: - CARGO_TERM_COLOR: always - -concurrency: - group: "${{ github.ref }}-${{ github.workflow }}" - cancel-in-progress: true - -jobs: - unit_test_splinter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Display envvars - run: env - - - name: Install Just - run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin - - - name: Unit Test Splinter - run: just ci-test diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml new file mode 100644 index 000000000..c8c4845e4 --- /dev/null +++ b/.github/workflows/rust.yaml @@ -0,0 +1,55 @@ +# Copyright 2021 Cargill Incorporated +# Copyright 2022-2024 Bitwise IO, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Rust + +on: + push: + branches: [ 0-6 ] + pull_request: + branches: [ 0-6 ] + schedule: + - cron: "0 10 * * *" + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +concurrency: + group: "${{ github.ref }}-${{ github.workflow }}" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Print rustc version + run: rustc --version + - name: Install Just + run: sudo snap install --edge --classic just + - name: Install apt packages + run: sudo apt-get install -y -q libzmq3-dev + - name: Install protoc + run: | + curl -OLsS https://github.com/google/protobuf/releases/download/v3.20.0/protoc-3.20.0-linux-x86_64.zip + unzip protoc-3.20.0-linux-x86_64.zip -d protoc3 + rm protoc-3.20.0-linux-x86_64.zip + - name: Lint + run: PATH=$PATH:$(pwd)/protoc3/bin just lint + - name: Build + run: PATH=$PATH:$(pwd)/protoc3/bin just build + - name: Run tests + run: PATH=$PATH:$(pwd)/protoc3/bin just test diff --git a/docker/compose/run-lint.yaml b/docker/compose/run-lint.yaml index dac7f4d2e..8f3b4ce88 100644 --- a/docker/compose/run-lint.yaml +++ b/docker/compose/run-lint.yaml @@ -16,19 +16,6 @@ version: "3.7" services: - lint-splinter: - build: - context: ../ - dockerfile: ./lint.dockerfile - args: - - http_proxy - - https_proxy - - no_proxy - image: lint-splinter:${ISOLATION_ID} - volumes: - - ../../:/project/splinter - command: just lint - lint-gameroom-client: build: context: ../../ diff --git a/justfile b/justfile index 9429b119e..c6889df40 100644 --- a/justfile +++ b/justfile @@ -58,9 +58,7 @@ ci: just ci-lint-client just ci-lint-dockerfiles just ci-lint-openapi - just ci-lint-splinter just ci-shellcheck - just ci-test just ci-test-gameroom ci-lint-client: @@ -72,13 +70,6 @@ ci-lint-client: ci-lint-dockerfiles: lint-dockerfiles -ci-lint-splinter: - #!/usr/bin/env sh - set -e - docker-compose -f docker/compose/run-lint.yaml build lint-splinter - docker-compose -f docker/compose/run-lint.yaml up \ - --abort-on-container-exit lint-splinter - ci-lint-openapi: lint-openapi ci-shellcheck: @@ -88,13 +79,6 @@ ci-shellcheck: docker run -t --rm -v $(pwd):/mnt koalaman/shellcheck:stable \ cli/packaging/ubuntu/completions/splinter -ci-test: - #!/usr/bin/env sh - set -e - docker-compose -f tests/test-splinter.yaml build unit-test-splinter - docker-compose -f tests/test-splinter.yaml up \ - --abort-on-container-exit unit-test-splinter - ci-test-gameroom: test-gameroom ci-test-gameroom-ui: test-gameroom-ui diff --git a/tests/test-splinter.yaml b/tests/test-splinter.yaml deleted file mode 100644 index abcb8fe78..000000000 --- a/tests/test-splinter.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2018-2022 Cargill Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ------------------------------------------------------------------------------ - -version: "3.7" - -services: - - unit-test-splinter: - build: - context: ../ - dockerfile: tests/Dockerfile - image: test-splinter:${ISOLATION_ID} - environment: - - TEST_MODE=--verbose --release - command: | - bash -c " - just test - " - stop_signal: SIGKILL