Skip to content

Commit

Permalink
Merge pull request #124 from The-Lum/automat
Browse files Browse the repository at this point in the history
feat: add first files for GitHub Action automation
  • Loading branch information
The-Lum authored Nov 25, 2024
2 parents 2ef80b9 + 7ca82be commit c731f0b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/RunAndCompress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# This workflow will run a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java Run (with Gradle) and Compress (with Brotli)

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
run-compress:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

- name: Run with Gradle
run: gradle run

- name: Give Brotli version
run: |
brotli -V
- name: TBC...
run: |
echo "TBC"
27 changes: 27 additions & 0 deletions script/generateOutput.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# Author: The-Lum
# Script:
# The script generates all the `x.repx` from raw files
# Usage:
# perl -w script/generateOutput.pl

use strict;
use warnings;
use feature qw(say);

# Input dir:
my @raw_files = glob("raw/*");

say("::group::Generate `x.repx` using brotli");
foreach (@raw_files) {
my $o = $_;
$o =~ s/raw/output/;
if (/abc.repx$/) {$o =~ s/abc.repx$/abx.repx/}
if (/def.repx$/) {$o =~ s/def.repx$/dex.repx/}
if (/ghi.repx$/) {$o =~ s/ghi.repx$/ghx.repx/}

say($_ . " --> " . $o);
my $output = qx/brotli -q 11 -vf -o $o $_/;
say($output);
}
say("::endgroup::");

0 comments on commit c731f0b

Please sign in to comment.