diff --git a/.dockerignore b/.dockerignore deleted file mode 120000 index 3e4e48b..0000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -.gitignore \ No newline at end of file diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0845f83 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,18 @@ +/.devcontainer/ +/.github/ +/.idea/ +/.vscode/ +/benches/ +/examples/ +/media/ +/target/ +/tests/ +/.dockerignore +/.gitignore +/Dockerfile +/icon.png +/LICENSE +/README.md +/riot.txt +/rustfmt.toml +**/*.rs.bk diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 47f8f5b..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: "Automated release" - -on: - push: - tags: - - "v*" - -jobs: - publish-docker: - name: "🐳 Build and publish Docker image on ghcr.io" - runs-on: ubuntu-latest - steps: - - name: "Checkout repository" - uses: actions/checkout@v2 - - - name: "❓ Find the release semantic version" - id: semver - uses: Steffo99/actions-semver@v0.3.4 - with: - string: ${{ github.ref_name }} - - - name: "🔨 Setup Buildx" - uses: docker/setup-buildx-action@v2 - - - name: "🔑 Login to GitHub Containers" - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: "🔽 Find the lowercase name of the repository" - id: reponame - uses: ASzc/change-string-case-action@v2 - with: - string: ${{ github.repository }} - - - name: "🏗 Build and push the Docker image" - uses: docker/build-push-action@v3 - with: - tags: >- - ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.precedence }}, - ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.core }}, - ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.pair }}, - ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.major }}, - ghcr.io/${{ steps.reponame.outputs.lowercase }}:latest - push: true - - - name: "🌐 Create release" - uses: ncipollo/release-action@v1.10.0 - with: - draft: true - generateReleaseNotes: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c8ab97f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,11 @@ +name: "Release new version" + +on: + # Creation of a new tag starting with v + push: + tags: + - "v*" + +jobs: + ghcrio: + uses: Steffo99/.github/.github/workflows/buildrelease-docker.yml@main diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b5114e3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: "Test suite" + +on: + # Modification of a project file in the main branch + push: + branches: + - main + paths: + - "src/**" + - "tests/**" + - "benches/**" + - "examples/**" + - "Cargo.toml" + - "Cargo.lock" + # Pull request to the main branch modifying a project file + pull_request: + branches: + - main + paths: + - "src/**" + - "tests/**" + - "benches/**" + - "examples/**" + - "Cargo.toml" + - "Cargo.lock" + # Triggered by a new release + workflow_call: + +env: + CARGO_TERM_COLOR: always + +jobs: + clippy: + uses: Steffo99/.github/.github/workflows/test-cargo-clippy.yml@main + + test: + uses: Steffo99/.github/.github/workflows/test-cargo-test.yml@main diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 8636780..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Continuous integration" - -on: - pull_request: - branches: - - main - workflow_call: - - -jobs: - cargotest: - name: "Run checks and tests on the repository" - runs-on: ubuntu-latest - steps: - - name: "Checkout repository" - uses: actions/checkout@v3 - - - name: "Install Rust toolchain" - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: "Run cargo clippy" - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features - - - name: "Run cargo test" - uses: actions-rs/cargo@v1 - with: - command: test diff --git a/.gitignore b/.gitignore index 790ae27..676c9ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -/data/ - # Generated by Cargo # will have compiled files and executables /target/ diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index ea1f3c5..f4525ef 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -3,7 +3,7 @@