Skip to content

Commit

Permalink
ci: Overhaul CI by copying from CaSILE
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Aug 26, 2024
1 parent fc0e4f2 commit 4dec1ca
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 95 deletions.
2 changes: 0 additions & 2 deletions .github/linters/.dockerfilelintrc

This file was deleted.

4 changes: 0 additions & 4 deletions .github/linters/.hadolint.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/linters/.markdown-lint.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/build.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on: [push, pull_request]
jobs:

commitlint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run ‘commitlint’ linter
uses: wagoid/commitlint-github-action@v2
uses: wagoid/commitlint-github-action@v5
with:
configFile: '.commitlintrc.yml'
17 changes: 10 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,32 @@ jobs:
ghcr:
strategy:
fail-fast: false
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Setup system dependencies
run: |
sudo apt-get install autoconf-archive
sudo apt-get install clang mold
- name: Configure
run: |
echo "REF=${GITHUB_REF##refs/*/}" >> $GITHUB_ENV
./bootstrap.sh
./configure --without-{bash,fish,zsh}-completion-dir --disable-dependency-checks
- name: Publish Docker Image to GH Pakcages
./configure \
--without-{bash,fish,zsh}-completion-dir \
--enable-developer-mode \
--disable-dependency-checks \
CURL=curl DOCKER=docker DIFF=diff TR=tr SORT=sort
- name: Publish Docker Image to GH Container Registry
run: |
make docker-build-push
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_REPO: ${{ github.repository }}
DOCKER_TAG: ${{ env.REF }}
DOCKER_TAG: ${{ github.ref_name }}
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PAT: ${{ secrets.CR_FONTSHIP }}
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,30 @@ jobs:
ghrelase:
strategy:
fail-fast: false
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup system dependencies
run: |
sudo apt-get install autoconf-archive
sudo apt-get install clang mold
- name: Configure
run: |
echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
echo "${GITHUB_REF#refs/*/v}" > .tarball-version
./bootstrap.sh
./configure --without-{bash,fish,zsh}-completion-dir --disable-dependency-checks
./configure \
--enable-developer-mode \
--without-{bash,fish,zsh}-completion-dir \
--disable-dependency-checks
- name: Build source package
run: |
make dist
- name: Publish Release
uses: softprops/action-gh-release@v1
if: github.repository == 'tehleagueof/fontship' && startsWith(github.ref, 'refs/tags/v')
with:
body_path: fontship-${{ env.VERSION }}.md
files: |
fontship-${{ env.VERSION }}.zip
fontship-${{ env.VERSION }}.tar.xz
fontship-${{ env.VERSION }}.tar.zst
10 changes: 6 additions & 4 deletions .github/workflows/rust_bloat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ on: [ "pull_request" ]
jobs:

cargo_bloat:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
- name: Run cargo bloat
uses: orf/cargo-bloat-action@v1
# https://github.com/orf/cargo-bloat-action/pull/302
# uses: orf/cargo-bloat-action@v1
uses: Kobzol/cargo-bloat-action@github-actions-cache
with:
token: ${{ github.token }}
13 changes: 8 additions & 5 deletions .github/workflows/rust_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt
- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
- name: Run rustfmt
run: |
git ls-files '*.rs' | xargs rustfmt --check
git ls-files '*.rs' '*.rs.in' | xargs rustfmt --check --config skip_children=true
clippy:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup system dependencies
run: |
sudo apt-get install clang mold
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: clippy
- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ github.token }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ on: [push, pull_request]
jobs:

test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Setup system dependencies
run: |
sudo apt-get install clang mold
- name: Install Rust
uses: actions-rs/toolchain@v1
- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
jobs:
actions-tagger:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: Actions-R-Us/actions-tagger@v2
with:
publish_latest_tag: true

0 comments on commit 4dec1ca

Please sign in to comment.