Skip to content

Commit

Permalink
Fix commands for extracting Maven properties
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrimes committed Dec 1, 2023
1 parent 162dd1e commit 4e9d323
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ jobs:
restore-keys: r-packages-${{ runner.os }}-
- name: Extract Spark version
working-directory: lib/R
run: echo "SPARK_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${pathling.Rapi.sparkVersion}' --non-recursive exec:exec)" >> $GITHUB_ENV
run: echo "SPARK_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.sparkVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Extract Hadoop version
working-directory: lib/R
run: echo "HADOOP_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${pathling.Rapi.hadoopVersion}' --non-recursive exec:exec)" >> $GITHUB_ENV
run: echo "HADOOP_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.hadoopVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Cache Spark
id: cache-spark
uses: actions/cache@v2
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Extract Spark version
working-directory: lib/R
run: echo "SPARK_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.sparkVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Extract Hadoop version
working-directory: lib/R
run: echo "HADOOP_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.hadoopVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Cache Spark
id: cache-spark
uses: actions/cache@v2
with:
path: /home/runner/spark/spark-${{ env.SPARK_VERSION }}-bin-hadoop${{ env.HADOOP_VERSION }}
key: spark-${{ env.SPARK_VERSION }}-bin-hadoop${{ env.HADOOP_VERSION }}
- name: Install Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: "4.1.3"
use-public-rspm: true
- name: Install texlive-latex-base
run: sudo apt-get install -y texlive-latex-base texlive-fonts-extra
- name: Run the verify goal with Maven
run: >-
mvn --batch-mode verify
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,10 @@ jobs:
restore-keys: r-packages-${{ runner.os }}-
- name: Extract Spark version
working-directory: lib/R
run: echo "SPARK_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${pathling.Rapi.sparkVersion}' --non-recursive exec:exec)" >> $GITHUB_ENV
run: echo "SPARK_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.sparkVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Extract Hadoop version
working-directory: lib/R
run: echo "HADOOP_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${pathling.Rapi.hadoopVersion}' --non-recursive exec:exec)" >> $GITHUB_ENV
run: echo "HADOOP_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.hadoopVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Cache Spark
id: cache-spark
uses: actions/cache@v2
Expand Down Expand Up @@ -677,10 +677,10 @@ jobs:
${{ runner.os }}-maven-
- name: Extract Spark version
working-directory: lib/R
run: echo "SPARK_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${pathling.Rapi.sparkVersion}' --non-recursive exec:exec)" >> $GITHUB_ENV
run: echo "SPARK_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.sparkVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Extract Hadoop version
working-directory: lib/R
run: echo "HADOOP_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${pathling.Rapi.hadoopVersion}' --non-recursive exec:exec)" >> $GITHUB_ENV
run: echo "HADOOP_VERSION=$(awk -F'[<>]' '/<pathling.Rapi.hadoopVersion>/ {print $3}' pom.xml)" >> $GITHUB_ENV
- name: Cache Spark
id: cache-spark
uses: actions/cache@v2
Expand Down

0 comments on commit 4e9d323

Please sign in to comment.