Sitelet https://github.com/weso/shaclex/commit/264dae1c544930ab7ca14ba9fd6b2409db6e55e7
Skip to content

Commit 264dae1

Browse files
committed
Generated actions
1 parent fd38a5a commit 264dae1

49 files changed

Lines changed: 3197 additions & 1706 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.bsp/sbt.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"sbt","version":"1.4.4","bspVersion":"2.0.0-M5","languages":["scala"],"argv":["/usr/lib/jvm/jdk-12.0.2/bin/java","-Xms100m","-Xmx100m","-classpath","/usr/share/sbt/bin/sbt-launch.jar","xsbt.boot.Boot","-bsp"]}
1+
{"name":"sbt","version":"1.4.9","bspVersion":"2.0.0-M5","languages":["scala"],"argv":["/usr/lib/jvm/jdk-12.0.2/bin/java","-Xms100m","-Xmx100m","-classpath","/usr/share/sbt/bin/sbt-launch.jar","xsbt.boot.Boot","-bsp"]}

‎.github/workflows/ci.yml‎

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# This file was automatically generated by sbt-github-actions using the
2+
# githubWorkflowGenerate task. You should add and commit this file to
3+
# your git repository. It goes without saying that you shouldn't edit
4+
# this file by hand! Instead, if you wish to make changes, you should
5+
# change your sbt build configuration to revise the workflow description
6+
# to meet your needs, then regenerate this file.
7+
8+
name: Continuous Integration
9+
10+
on:
11+
pull_request:
12+
branches: ['*']
13+
push:
14+
branches: ['*']
15+
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
19+
jobs:
20+
build:
21+
name: Build and Test
22+
strategy:
23+
matrix:
24+
os: [ubuntu-latest]
25+
scala: [2.12.12]
26+
java: [adopt@1.11]
27+
runs-on: ${{ matrix.os }}
28+
steps:
29+
- name: Checkout current branch (full)
30+
uses: actions/checkout@v2
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Setup Java and Scala
35+
uses: olafurpg/setup-scala@v10
36+
with:
37+
java-version: ${{ matrix.java }}
38+
39+
- name: Cache sbt
40+
uses: actions/cache@v2
41+
with:
42+
path: |
43+
~/.sbt
44+
~/.ivy2/cache
45+
~/.coursier/cache/v1
46+
~/.cache/coursier/v1
47+
~/AppData/Local/Coursier/Cache/v1
48+
~/Library/Caches/Coursier/v1
49+
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
50+
51+
- name: Check that workflows are up to date
52+
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
53+
54+
- name: Build project
55+
run: sbt ++${{ matrix.scala }} test
56+
57+
- name: Compress target directories
58+
run: tar cf targets.tar modules/sgraph/target modules/slang/target target modules/schemaInfer/target modules/schema/target modules/converter/target project/target
59+
60+
- name: Upload target directories
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
64+
path: targets.tar
65+
66+
publish:
67+
name: Publish Artifacts
68+
needs: [build]
69+
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
70+
strategy:
71+
matrix:
72+
os: [ubuntu-latest]
73+
scala: [2.12.12]
74+
java: [adopt@1.11]
75+
runs-on: ${{ matrix.os }}
76+
steps:
77+
- name: Checkout current branch (full)
78+
uses: actions/checkout@v2
79+
with:
80+
fetch-depth: 0
81+
82+
- name: Setup Java and Scala
83+
uses: olafurpg/setup-scala@v10
84+
with:
85+
java-version: ${{ matrix.java }}
86+
87+
- name: Cache sbt
88+
uses: actions/cache@v2
89+
with:
90+
path: |
91+
~/.sbt
92+
~/.ivy2/cache
93+
~/.coursier/cache/v1
94+
~/.cache/coursier/v1
95+
~/AppData/Local/Coursier/Cache/v1
96+
~/Library/Caches/Coursier/v1
97+
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
98+
99+
- name: Download target directories (2.12.12)
100+
uses: actions/download-artifact@v2
101+
with:
102+
name: target-${{ matrix.os }}-2.12.12-${{ matrix.java }}
103+
104+
- name: Inflate target directories (2.12.12)
105+
run: |
106+
tar xf targets.tar
107+
rm targets.tar
108+
109+
- name: Publish project
110+
run: sbt ++${{ matrix.scala }} +publish

‎.github/workflows/clean.yml‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This file was automatically generated by sbt-github-actions using the
2+
# githubWorkflowGenerate task. You should add and commit this file to
3+
# your git repository. It goes without saying that you shouldn't edit
4+
# this file by hand! Instead, if you wish to make changes, you should
5+
# change your sbt build configuration to revise the workflow description
6+
# to meet your needs, then regenerate this file.
7+
8+
name: Clean
9+
10+
on: push
11+
12+
jobs:
13+
delete-artifacts:
14+
name: Delete Artifacts
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- name: Delete artifacts
20+
run: |
21+
# Customize those three lines with your repository and credentials:
22+
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
23+
24+
# A shortcut to call GitHub API.
25+
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
26+
27+
# A temporary file which receives HTTP response headers.
28+
TMPFILE=/tmp/tmp.$$
29+
30+
# An associative array, key: artifact name, value: number of artifacts of that name.
31+
declare -A ARTCOUNT
32+
33+
# Process all artifacts on this repository, loop on returned "pages".
34+
URL=$REPO/actions/artifacts
35+
while [[ -n "$URL" ]]; do
36+
37+
# Get current page, get response headers in a temporary file.
38+
JSON=$(ghapi --dump-header $TMPFILE "$URL")
39+
40+
# Get URL of next page. Will be empty if we are at the last page.
41+
URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*<//' -e 's/>.*//')
42+
rm -f $TMPFILE
43+
44+
# Number of artifacts on this page:
45+
COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') ))
46+
47+
# Loop on all artifacts on this page.
48+
for ((i=0; $i < $COUNT; i++)); do
49+
50+
# Get name of artifact and count instances of this name.
51+
name=$(jq <<<$JSON -r ".artifacts[$i].name?")
52+
ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1))
53+
54+
id=$(jq <<<$JSON -r ".artifacts[$i].id?")
55+
size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") ))
56+
printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size
57+
ghapi -X DELETE $REPO/actions/artifacts/$id
58+
done
59+
done

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ sbt> run -d examples/shacl/good1.ttl --engine ShaClex
102102

103103
### Binary mode
104104

105-
The fastest way to run Shaclex is to compile the code and generate a binary.
106-
The following command:
105+
The fastest way to run Shaclex is to compile the code and generate a comand line binary file.
106+
107+
The following command will generate a binary file:
107108

108109
```sh
109110
$ sbt universal:packageBin

0 commit comments

Comments
 (0)