Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 651053e
Author: pvshvp-oss <[email protected]>
Date:   Sun Mar 10 15:50:45 2024 -0500

    Try creating a matrix for CI

commit 63143a6
Author: pvshvp-oss <[email protected]>
Date:   Sat Mar 9 11:15:57 2024 -0600

    CI

commit 2adf8fe
Author: pvshvp-oss <[email protected]>
Date:   Fri Mar 8 11:55:33 2024 -0600

    Migrate configuration to Figment

commit b970757
Author: pvshvp-oss <[email protected]>
Date:   Fri Mar 8 07:41:03 2024 -0600

    Add CI for packaging on Arch Linux

commit 7da786e
Author: pvshvp-oss <[email protected]>
Date:   Fri Mar 8 06:45:50 2024 -0600

    Update versions of dependencies

commit 9aa4895
Author: pvshvp-oss <[email protected]>
Date:   Fri Mar 8 06:35:40 2024 -0600

    Some formatting

commit 5f244ce
Author: pvshvp-oss <[email protected]>
Date:   Fri Mar 8 05:58:39 2024 -0600

    Building works

commit a582a76
Author: pvshvp-oss <[email protected]>
Date:   Fri Mar 8 05:50:37 2024 -0600

    Initial reorg
  • Loading branch information
pvshvp-oss committed Mar 10, 2024
1 parent 4c1df6c commit 5dfa72f
Show file tree
Hide file tree
Showing 55 changed files with 2,430 additions and 967 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.tar filter=lfs diff=lfs merge=lfs -text
*.tar* filter=lfs diff=lfs merge=lfs -text
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ main ]

name: πŸ“œ API Documentation
name: πŸ“œ Document API

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main]

name: πŸ”Ž Code Coverage
name: πŸ”Ž Code Test Coverage

jobs:
grcov:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
on:
workflow_dispatch:
workflow_call:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: # Run when manually triggered
workflow_call: # Run when called by another workflow

name: βœ” Validate
name: βœ” Validate Code

jobs:
fmt:
name: πŸ“‘ Rustfmt
name: πŸ“‘ Rustfmt Job
if: |
!startsWith(github.event.head_commit.message, 'ci:')
&& !startsWith(github.event.head_commit.message, 'ci(')
runs-on: ubuntu-latest
steps:
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v2
- name: 🧰 Install Rust Toolchain
id: install_toolchain_step
- name: 🎟 Checkout Git Repository Step
id: repository_checkout_step
uses: actions/checkout@v4
- name: 🧰 Install Rust Toolchain Step
id: toolchain_install_step
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: πŸ—‚ Set up cargo cache
id: setup_cache_step
uses: actions/cache@v3
- name: πŸ—‚ Setup Cargo Cache Step
id: cache_setup_step
uses: actions/cache@v4
continue-on-error: false
with:
path: |
Expand All @@ -48,7 +48,7 @@ jobs:
args: --verbose -- --check

clippy:
name: πŸ“Ž Clippy
name: πŸ“Ž Clippy Job
if: |
!startsWith(github.event.head_commit.message, 'ci:')
&& !startsWith(github.event.head_commit.message, 'ci(')
Expand Down Expand Up @@ -79,20 +79,21 @@ jobs:
env:
IS_CROSS: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
steps:
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v2
- name: 🎟 Checkout Git Repository Step
id: repository_checkout_step
uses: actions/checkout@v4
- name: 🧰 Install Rust Toolchain
id: install_toolchain_step
id: toolchain_install_step
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: πŸ—‚ Set up cargo cache
id: setup_cache_step
uses: actions/cache@v3
- name: πŸ—‚ Setup Cargo Cache Step
id: cache_setup_step
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
Expand All @@ -111,7 +112,7 @@ jobs:
args: --workspace --target ${{ matrix.target }} -- -D warnings

check:
name: βœ… Check
name: βœ… Check Job
if: |
!startsWith(github.event.head_commit.message, 'ci:')
&& !startsWith(github.event.head_commit.message, 'ci(')
Expand Down Expand Up @@ -143,19 +144,19 @@ jobs:
env:
IS_CROSS: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
steps:
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v2
- name: 🧰 Install Rust Toolchain
id: install_toolchain_step
- name: 🎟 Checkout Git Repository Step
id: repository_checkout_step
uses: actions/checkout@v4
- name: 🧰 Install Rust Toolchain Step
id: toolchain_install_step
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- name: πŸ—‚ Set up cargo cache
id: setup_cache_step
- name: πŸ—‚ Setup Cargo Cache Step
id: cache_setup_step
uses: actions/cache@v3
with:
path: |
Expand All @@ -166,7 +167,7 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: βœ… Cargo Check
- name: βœ… Cargo Check Step
id: cargo_check_step
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -211,15 +212,15 @@ jobs:
id: checkout_repository_step
uses: actions/checkout@v2
- name: 🧰 Install Rust Toolchain
id: install_toolchain_step
id: toolchain_install_step
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- name: πŸ—‚ Set up cargo cache
id: setup_cache_step
- name: πŸ—‚ Setup Cargo Cache Step
id: cache_setup_step
uses: actions/cache@v3
with:
path: |
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/package_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: πŸ“¦πŸ— Build Package(s)

on:
workflow_dispatch: # Run when manually triggered
inputs:
branch:
description: 'The branch to act on.'
default: 'main'
required: false
type: string
release_type:
description: 'The release type - Stable or Unstable. The stable release uses the source from the latest git tag whereas the unstable release uses the source from the latest git commit.'
default: 'Stable'
required: false
type: string
workflow_call: # Run when called by another workflow
inputs:
branch:
description: 'The branch to act on.'
default: 'main'
required: false
type: string
release_type:
description: 'The release type - Stable or Unstable. The stable release uses the source from the latest git tag whereas the unstable release uses the source from the latest git commit.'
default: 'Stable'
required: false
type: string

run-name: ${{ inputs.release_type }} Package Build triggered by ${{ github.actor }} on branch ${{ inputs.branch }}

jobs:
package_build_job:
name: πŸ“¦πŸ— Build Package
strategy:
matrix:
platform:
- archlinux
# - debian
# - fedora
# - opensuse
# - windows
# - macos
# - flatpak
architecture:
- x86_64
# - arm
include:
- os: archlinux
architecture: x86_64
compilation_target: x86_64-unknown-linux-gnu
docker_image: archlinux:latest
runner: ubuntu-latest
# - os: archlinux
# architecture: arm
# compilation_target: aarch64-unknown-linux-gnu
# docker_image: archlinux:latest
# runner: ubuntu-latest
runs-on: ubuntu-latest
container:
image: archlinux:latest
ports:
- 80
steps:
- name: πŸ‹ Initialize Arch Linux Docker Container
id: docker_init_step
run: |
# pacman-key --init
pacman -Sy --noconfirm base-devel git # Install essential dependencies
useradd build_user -m # Create the build user
passwd -d build_user # Delete build_user's password
printf 'build_user ALL=(ALL) ALL\n' | tee -a /etc/sudoers # Allow build_user password-less sudo
- name: 🎟 Checkout Git Repository
id: repository_checkout_step
uses: actions/checkout@v4
- name: πŸ›  Build Package
id: package_build_step
run: |
chown -R build_user packaging
chmod -R +x packaging
sudo -u build_user sh -c "packaging/archlinux/build_package.sh stable --noconfirm"
- name: ⬆ Upload Package Artifact
id: upload_package_step
uses: actions/upload-artifact@v4
with:
name: Stable Package
path: |
packaging/archlinux/paxy/*.pkg.tar.*
if-no-files-found: error
76 changes: 76 additions & 0 deletions .github/workflows/package_pre_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 🎊 Pre-Release (Git)
run-name: Pre-Release (Git) triggered by ${{ github.actor }}
on:
workflow_dispatch:
workflow_call:
jobs:
build:
name: πŸ— Build for Arch Linux
runs-on: ubuntu-latest
container:
image: rebornos/rebornos:latest
ports:
- 80
steps:
- name: πŸ‹ Initialize RebornOS Docker Container
id: init_docker_step
run: sh /usr/bin/init-rebornos-docker.sh
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v4
- name: πŸ›  Build Package
id: build_package_step
run: |
chown -R rebornos packaging
chmod -R +x packaging
sudo -u rebornos sh -c "packaging/archlinux/build_package.sh git --noconfirm"
- name: ⬆ Upload Package Artifact
id: upload_package_step
uses: actions/upload-artifact@v3
with:
name: Unstable Package
path: |
packaging/archlinux/paxy-git/*.pkg.tar.*
if-no-files-found: error
release:
needs: build
name: 🎊 Pre-Release
runs-on: ubuntu-latest
steps:
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v4
- name: 🏷 Determine Tags and Versions
id: set_versions_step
run: |
git fetch --prune --unshallow --tags -f
LATEST_TAG="$(git tag | grep -v -P '^v([0-9]+)\.([0-9]+)\.([0-9]+).*\.' | grep -v -P '^v([0-9]+)\.([0-9]+)\.([0-9]+).*\.' | grep -v -P '^v([0-9]+)\.([0-9]+)\.([0-9]+)_$' | sort --version-sort | tail -n1)"
GIT_VERSION="$(git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")"
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
echo "GIT_VERSION=$GIT_VERSION" >> $GITHUB_ENV
echo "LATEST_TAG=$LATEST_TAG"
echo "GIT_VERSION=$GIT_VERSION"
- name: ⬇ Download Package Artifact
id: download_package_step
uses: actions/download-artifact@v3
with:
name: Unstable Package
path: output
- name: πŸ–© Generate CheckSum
id: generate_checksum_step
run: |
cd ${{ steps.download_package_step.outputs.download-path }}
find . -type f -exec sh -c 'sha256sum "$0" > "$0.sha256sum"' {} \;
- name: 🎊 Create Pre-Release
id: create_release_step
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: true
fail_on_unmatched_files: true
generate_release_notes: true
append_body: false
tag_name: ${{ env.GIT_VERSION }}
name: ${{ env.GIT_VERSION }}
files: |
${{ steps.download_package_step.outputs.download-path }}/*.pkg.tar.*
Loading

0 comments on commit 5dfa72f

Please sign in to comment.