From 4a0ab0da6c3904b9f827a9650b7cbf4736210359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 5 Sep 2024 18:28:05 +0200 Subject: [PATCH 1/7] ci: add demo forgejo workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .forgejo/workflows/demo.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .forgejo/workflows/demo.yaml diff --git a/.forgejo/workflows/demo.yaml b/.forgejo/workflows/demo.yaml new file mode 100644 index 0000000..ee78167 --- /dev/null +++ b/.forgejo/workflows/demo.yaml @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2024 Christina Sørensen +# +# SPDX-License-Identifier: EUPL-1.2 + +on: [push] +jobs: + test: + runs-on: native + steps: + - run: echo All Good From 8fb36ace8ea959f963b487b99e300d249ade4dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 5 Sep 2024 18:40:34 +0200 Subject: [PATCH 2/7] ci: port github runners to forgejo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- {.github => .forgejo}/CODEOWNERS | 0 {.github => .forgejo}/workflows/audit.yml | 2 +- .../workflows/conventional-commits.yml | 2 +- {.github => .forgejo}/workflows/flake.yml | 6 +- .../workflows/unit-tests.yml | 4 +- .github/dependabot.yml | 21 ---- .github/workflows/unit-tests-bsd.yml | 97 ------------------- 7 files changed, 7 insertions(+), 125 deletions(-) rename {.github => .forgejo}/CODEOWNERS (100%) rename {.github => .forgejo}/workflows/audit.yml (94%) rename {.github => .forgejo}/workflows/conventional-commits.yml (94%) rename {.github => .forgejo}/workflows/flake.yml (95%) rename {.github => .forgejo}/workflows/unit-tests.yml (93%) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/unit-tests-bsd.yml diff --git a/.github/CODEOWNERS b/.forgejo/CODEOWNERS similarity index 100% rename from .github/CODEOWNERS rename to .forgejo/CODEOWNERS diff --git a/.github/workflows/audit.yml b/.forgejo/workflows/audit.yml similarity index 94% rename from .github/workflows/audit.yml rename to .forgejo/workflows/audit.yml index 2b68b82..8ea848c 100644 --- a/.github/workflows/audit.yml +++ b/.forgejo/workflows/audit.yml @@ -14,7 +14,7 @@ on: - 'deny.toml' jobs: security_audit: - runs-on: ubuntu-latest + runs-on: native steps: - uses: actions/checkout@v4 - uses: taiki-e/install-action@cargo-deny diff --git a/.github/workflows/conventional-commits.yml b/.forgejo/workflows/conventional-commits.yml similarity index 94% rename from .github/workflows/conventional-commits.yml rename to .forgejo/workflows/conventional-commits.yml index c1d7b4c..303bc95 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.forgejo/workflows/conventional-commits.yml @@ -14,7 +14,7 @@ concurrency: jobs: build: name: Conventional Commits - runs-on: ubuntu-latest + runs-on: native steps: - uses: actions/checkout@v4 - uses: webiny/action-conventional-commits@v1.3.0 diff --git a/.github/workflows/flake.yml b/.forgejo/workflows/flake.yml similarity index 95% rename from .github/workflows/flake.yml rename to .forgejo/workflows/flake.yml index 728bb81..5389032 100644 --- a/.github/workflows/flake.yml +++ b/.forgejo/workflows/flake.yml @@ -30,14 +30,14 @@ concurrency: jobs: flake-checker: name: Flake Checker - runs-on: ubuntu-22.04 + runs-on: native steps: - uses: actions/checkout@v4 - name: Check Nix flake inputs uses: DeterminateSystems/flake-checker-action@v8 check: name: Check Nix Flake - runs-on: ubuntu-22.04 + runs-on: native steps: - uses: actions/checkout@v4 - name: Install Nix @@ -52,7 +52,7 @@ jobs: strategy: matrix: target: [x86_64-linux] - runs-on: ubuntu-22.04 + runs-on: native steps: - uses: actions/checkout@v4 - name: Install Nix diff --git a/.github/workflows/unit-tests.yml b/.forgejo/workflows/unit-tests.yml similarity index 93% rename from .github/workflows/unit-tests.yml rename to .forgejo/workflows/unit-tests.yml index e083b91..93eac61 100644 --- a/.github/workflows/unit-tests.yml +++ b/.forgejo/workflows/unit-tests.yml @@ -26,11 +26,11 @@ env: RUSTFLAGS: --deny warnings jobs: unit-tests: - runs-on: ${{ matrix.os }} + runs-on: ${{ matxrix.os }} continue-on-error: ${{ matrix.rust == 'nightly' }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [native] rust: [1.70.0, stable, beta, nightly] steps: - name: Checkout repository diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 552160b..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "cargo" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "github-actions" - # Workflow files stored in the - # default location of `.github/workflows` - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/unit-tests-bsd.yml b/.github/workflows/unit-tests-bsd.yml deleted file mode 100644 index f31934f..0000000 --- a/.github/workflows/unit-tests-bsd.yml +++ /dev/null @@ -1,97 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -name: Unit tests (BSD) -on: - push: - branches: [main] - paths: - - '.github/workflows/unit-tests-bsd.yml' - - 'src/**' - - 'Cargo.*' - - build.rs - pull_request: - branches: [main] - paths: - - '.github/workflows/unit-tests-bsd.yml' - - 'src/**' - - 'Cargo.*' - - build.rs -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true -jobs: - unit-tests-freebsd: - runs-on: ubuntu-22.04 - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Compile - uses: vmactions/freebsd-vm@v1 - with: - release: '14.1' - usesh: true - prepare: | - pkg install -y rust git - cargo install cargo-hack - git config --global --add safe.directory /home/runner/work/eza/eza - run: | - set -e - export CARGO_TERM_COLOR="always" - export RUSTFLAGS="--deny warnings" - cargo fmt --check - cargo clippy -- -D warnings - cargo hack test - unit-tests-netbsd: - runs-on: ubuntu-22.04 - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Compile - uses: vmactions/netbsd-vm@v1 - with: - release: '10.0' - usesh: true - prepare: | - PATH="/root/.cargo/bin:/usr/pkg/sbin:/usr/pkg/bin:$PATH" - PKG_PATH="https://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.0/All/" - export PATH PKG_PATH - /usr/sbin/pkg_add pkgin - pkgin -y install rust git - cargo install cargo-hack - git config --global --add safe.directory /home/runner/work/eza/eza - run: | - set -e - export CARGO_TERM_COLOR="always" - export RUSTFLAGS="--deny warnings" - cargo fmt --check - cargo clippy -- -D warnings - cargo hack test - unit-tests-openbsd: - runs-on: ubuntu-22.04 - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Compile - uses: vmactions/openbsd-vm@v1 - with: - release: '7.4' - usesh: true - prepare: | - pkg_add rust rust-rustfmt rust-clippy git - cargo install cargo-hack - git config --global --add safe.directory /home/runner/work/eza/eza - run: | - set -e - export CARGO_TERM_COLOR="always" - export RUSTFLAGS="--deny warnings" - cargo fmt --check - cargo clippy -- -D warnings - cargo hack test From f2e1a4761e3fd91d3a5b6347ceb45b2b9334f42e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 5 Sep 2024 18:43:13 +0200 Subject: [PATCH 3/7] ci: attempt to fix audit.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .forgejo/workflows/audit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/audit.yml b/.forgejo/workflows/audit.yml index 8ea848c..9a5fcfb 100644 --- a/.forgejo/workflows/audit.yml +++ b/.forgejo/workflows/audit.yml @@ -17,6 +17,6 @@ jobs: runs-on: native steps: - uses: actions/checkout@v4 - - uses: taiki-e/install-action@cargo-deny + - uses: https://github.com/taiki-e/install-action@cargo-deny - name: Scan for vulnerabilities run: cargo deny check From 332fddde940e43a1308115282a7fb2faf70e83bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 5 Sep 2024 18:44:44 +0200 Subject: [PATCH 4/7] ci: attempt to fix conventional-commits.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .forgejo/workflows/conventional-commits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/conventional-commits.yml b/.forgejo/workflows/conventional-commits.yml index 303bc95..874d590 100644 --- a/.forgejo/workflows/conventional-commits.yml +++ b/.forgejo/workflows/conventional-commits.yml @@ -17,4 +17,4 @@ jobs: runs-on: native steps: - uses: actions/checkout@v4 - - uses: webiny/action-conventional-commits@v1.3.0 + - uses: https://github.com/webiny/action-conventional-commits@v1.3.0 From 330656f01e4e8cbcb965e809a95480790afca35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 5 Sep 2024 18:47:55 +0200 Subject: [PATCH 5/7] ci: trigger audit on push to pr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .forgejo/workflows/audit.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/audit.yml b/.forgejo/workflows/audit.yml index 9a5fcfb..b98bf6b 100644 --- a/.forgejo/workflows/audit.yml +++ b/.forgejo/workflows/audit.yml @@ -12,11 +12,12 @@ on: - '**/Cargo.toml' - '**/Cargo.lock' - 'deny.toml' + pull_request: + branches: [main] jobs: security_audit: runs-on: native steps: - uses: actions/checkout@v4 - - uses: https://github.com/taiki-e/install-action@cargo-deny - name: Scan for vulnerabilities - run: cargo deny check + run: nix develop --accept-flake-config --command cargo deny check From 86938a9ec7be45b8a6b541b6b2db05db96daa2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 5 Sep 2024 19:06:54 +0200 Subject: [PATCH 6/7] ci: fix license allowance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- deny.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deny.toml b/deny.toml index 98ceb4d..919fb92 100644 --- a/deny.toml +++ b/deny.toml @@ -7,4 +7,4 @@ multiple-versions = 'allow' [licenses] private = { ignore = true } -allow = ["MIT"] +allow = ["MIT", "ISC", "MPL-2.0", "Apache-2.0", "Unicode-DFS-2016", "BSD-3-Clause"] From 8dc6f4305cbec51ee2444f5d8d67ee6064296f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 5 Sep 2024 21:02:09 +0200 Subject: [PATCH 7/7] ci: removed unused cheks, add funding for github MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .forgejo/workflows/flake.yml | 63 ------------------- .forgejo/workflows/unit-tests.yml | 51 --------------- .../demo.yaml => .github/FUNDING.yml | 7 +-- 3 files changed, 1 insertion(+), 120 deletions(-) delete mode 100644 .forgejo/workflows/flake.yml delete mode 100644 .forgejo/workflows/unit-tests.yml rename .forgejo/workflows/demo.yaml => .github/FUNDING.yml (52%) diff --git a/.forgejo/workflows/flake.yml b/.forgejo/workflows/flake.yml deleted file mode 100644 index 5389032..0000000 --- a/.forgejo/workflows/flake.yml +++ /dev/null @@ -1,63 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -on: - workflow_dispatch: - pull_request: - branches: [main] - paths: - - '.github/workflows/flake.yml' - - 'src/**' - - 'Cargo.*' - - "*.toml" - - "flake.*" - - "*.nix" - - "*.rs" - push: - branches: [main] - paths: - - '.github/workflows/flake.yml' - - 'src/**' - - 'Cargo.*' - - "*.toml" - - "flake.*" - - "*.nix" - - "*.rs" -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true -jobs: - flake-checker: - name: Flake Checker - runs-on: native - steps: - - uses: actions/checkout@v4 - - name: Check Nix flake inputs - uses: DeterminateSystems/flake-checker-action@v8 - check: - name: Check Nix Flake - runs-on: native - steps: - - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v13 - - name: Setup Nix cache - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Nix Flake Check - run: nix flake check --all-systems - build: - name: Build Nix package - # if cross compilation is desired add 'aarch64-linux', 'x86_64-darwin' and 'aarch64-darwin' and fix the flake to support cross compilation. - strategy: - matrix: - target: [x86_64-linux] - runs-on: native - steps: - - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v13 - - name: Setup Nix cache - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Nix Build - run: nix build .#packages.${{ matrix.target }}.default diff --git a/.forgejo/workflows/unit-tests.yml b/.forgejo/workflows/unit-tests.yml deleted file mode 100644 index 93eac61..0000000 --- a/.forgejo/workflows/unit-tests.yml +++ /dev/null @@ -1,51 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -name: Unit tests -on: - push: - branches: [main] - paths: - - '.github/workflows/unit-tests.yml' - - 'src/**' - - 'Cargo.*' - - build.rs - pull_request: - branches: [main] - paths: - - '.github/workflows/unit-tests.yml' - - 'src/**' - - 'Cargo.*' - - build.rs -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: --deny warnings -jobs: - unit-tests: - runs-on: ${{ matxrix.os }} - continue-on-error: ${{ matrix.rust == 'nightly' }} - strategy: - matrix: - os: [native] - rust: [1.70.0, stable, beta, nightly] - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - run: rustup toolchain install ${{ matrix.rust }} --profile minimal - - uses: Swatinem/rust-cache@v2 - - name: Install cargo-hack - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: cargo install cargo-hack - - name: Run rustfmt checks - run: cargo fmt --check - - name: Run clippy lints - run: cargo clippy -- -D warnings - - name: Run unit tests - run: cargo hack test diff --git a/.forgejo/workflows/demo.yaml b/.github/FUNDING.yml similarity index 52% rename from .forgejo/workflows/demo.yaml rename to .github/FUNDING.yml index ee78167..c75496a 100644 --- a/.forgejo/workflows/demo.yaml +++ b/.github/FUNDING.yml @@ -2,9 +2,4 @@ # # SPDX-License-Identifier: EUPL-1.2 -on: [push] -jobs: - test: - runs-on: native - steps: - - run: echo All Good +github: cafkafk