Skip to content

Commit c731f0b

Browse files
authored
Merge pull request #124 from The-Lum/automat
feat: add first files for GitHub Action automation
2 parents 2ef80b9 + 7ca82be commit c731f0b

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
# This workflow will run a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
3+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
4+
5+
name: Java Run (with Gradle) and Compress (with Brotli)
6+
7+
on:
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
jobs:
12+
run-compress:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
19+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
20+
- name: Setup Gradle
21+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
22+
23+
- name: Run with Gradle
24+
run: gradle run
25+
26+
- name: Give Brotli version
27+
run: |
28+
brotli -V
29+
30+
- name: TBC...
31+
run: |
32+
echo "TBC"
33+

script/generateOutput.pl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
# Author: The-Lum
3+
# Script:
4+
# The script generates all the `x.repx` from raw files
5+
# Usage:
6+
# perl -w script/generateOutput.pl
7+
8+
use strict;
9+
use warnings;
10+
use feature qw(say);
11+
12+
# Input dir:
13+
my @raw_files = glob("raw/*");
14+
15+
say("::group::Generate `x.repx` using brotli");
16+
foreach (@raw_files) {
17+
my $o = $_;
18+
$o =~ s/raw/output/;
19+
if (/abc.repx$/) {$o =~ s/abc.repx$/abx.repx/}
20+
if (/def.repx$/) {$o =~ s/def.repx$/dex.repx/}
21+
if (/ghi.repx$/) {$o =~ s/ghi.repx$/ghx.repx/}
22+
23+
say($_ . " --> " . $o);
24+
my $output = qx/brotli -q 11 -vf -o $o $_/;
25+
say($output);
26+
}
27+
say("::endgroup::");

0 commit comments

Comments
 (0)