From 9426313f73ada4958f35fd6f551ecb5d4ec435fa Mon Sep 17 00:00:00 2001 From: NexVeridian Date: Mon, 20 Nov 2023 11:41:44 -0800 Subject: [PATCH] 1.2.0 License --- .dockerignore | 2 ++ .github/workflows/docker.yml | 20 ++++++++-------- .github/workflows/nextest.yml | 45 +++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 11 +++++++++ LICENSE => LICENSE-Apache | 0 LICENSE-MIT | 21 ++++++++++++++++ README.md | 5 ++++ 7 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/nextest.yml create mode 100644 CONTRIBUTING.md rename LICENSE => LICENSE-Apache (100%) create mode 100644 LICENSE-MIT diff --git a/.dockerignore b/.dockerignore index 729d6d6..e6b1329 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,7 @@ /.devcontainer +/.github /.vscode +/data /target .dockerignore Cargo.lock diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7c44858..c7a8e1e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,15 +5,15 @@ name: Docker # separate terms of service, privacy policy, and support # documentation. on: - # workflow_run: - # workflows: [nextest] - # branches: [main] - # types: - # - completed - schedule: - - cron: 0 0 * * 1 - push: - branches: ["main"] + workflow_run: + workflows: [nextest] + branches: [main] + types: + - completed + # schedule: + # - cron: 0 0 * * 1 + # push: + # branches: ["main"] # # Publish semver tags as releases. # tags: [ 'v*.*.*' ] # pull_request: @@ -29,7 +29,7 @@ jobs: build: runs-on: ubuntu-latest # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow - # if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' }} permissions: contents: read packages: write diff --git a/.github/workflows/nextest.yml b/.github/workflows/nextest.yml new file mode 100644 index 0000000..f1c8056 --- /dev/null +++ b/.github/workflows/nextest.yml @@ -0,0 +1,45 @@ +# https://github.com/nextest-rs/reuse-build-partition-example +# https://keliris.dev/articles/setup-rust-github-actions + +name: nextest + +on: + pull_request: + branches: [main] + push: + branches: [main] + schedule: + - cron: 0 0 * * 1 + +env: + CARGO_TERM_COLOR: always + +jobs: + run-tests: + name: Run tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # - uses: rui314/setup-mold@v1 + - name: install mold + run: sudo apt-get install -y musl-tools musl-dev libssl-dev clang mold + # https://github.com/moonrepo/setup-rust + - uses: moonrepo/setup-rust@v1 + with: + bins: cargo-nextest + - name: Run tests + run: cargo nextest run -E "all() - test(get_api) - kind(bin)" + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # - uses: rui314/setup-mold@v1 + - name: install mold + run: sudo apt-get install -y musl-tools musl-dev libssl-dev clang mold + - uses: moonrepo/setup-rust@v1 + with: + components: clippy + - name: clippy + run: cargo clippy diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7764671 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing code +- Make sure the test pass +- Run `cargo clippy --fix --allow-dirty` + +# License +All code in this repository is dual-licensed under either [License-MIT](./LICENSE-MIT) or [LICENSE-APACHE](./LICENSE-Apache) at your option. This means you can select the license you prefer. + +[Why dual license](https://github.com/bevyengine/bevy/issues/2373) + +# Your contributions +Any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. diff --git a/LICENSE b/LICENSE-Apache similarity index 100% rename from LICENSE rename to LICENSE-Apache diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..13e0f70 --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Elijah McMorris (NexVeridian) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 56a2937..db35894 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,8 @@ Place data in `data\parquet\*.parquet` with the ticker in all caps `ARKK.parquet `docker compose build && docker compose up` Remove the cargo cache for buildkit with `docker builder prune --filter type=exec.cachemount` + +# License +All code in this repository is dual-licensed under either [License-MIT](./LICENSE-MIT) or [LICENSE-APACHE](./LICENSE-Apache) at your option. This means you can select the license you prefer. + +[Why dual license](https://github.com/bevyengine/bevy/issues/2373)