Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue1017] Allow running Ubuntu workflow for repos with arbitrary names. #38

Merged
merged 4 commits into from Apr 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/ubuntu.yml
Expand Up @@ -3,6 +3,11 @@ name: Ubuntu

on: [push, pull_request]

# Some notes on file paths: the working directory is $GITHUB_WORKSPACE,
# which equals /home/runner/work/my-repo-name/my-repo-name. The code is
# checked out to $GITHUB_WORKSPACE as well. We put all libraries under
# /home/runner/lib.

jobs:
compile:
name: Compile planner
Expand All @@ -29,9 +34,9 @@ jobs:
CXX: ${{ matrix.compiler-version.cxx }}
CPLEX_URL: ${{ secrets.CPLEX129_LINUX_URL }}
SOPLEX_URL: ${{ secrets.SOPLEX311_URL }}
DOWNWARD_CPLEX_ROOT: /home/runner/work/downward/lib/ibm/ILOG/CPLEX_Studio129/cplex
DOWNWARD_SOPLEX_ROOT: /home/runner/work/downward/lib/soplex-3.1.1
DOWNWARD_COIN_ROOT: /home/runner/work/downward/lib/coin
DOWNWARD_CPLEX_ROOT: /home/runner/lib/ibm/ILOG/CPLEX_Studio129/cplex
DOWNWARD_SOPLEX_ROOT: /home/runner/lib/soplex-3.1.1
DOWNWARD_COIN_ROOT: /home/runner/lib/coin
steps:
- name: Clone repository
uses: actions/checkout@master
Expand All @@ -44,7 +49,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get -y install zlib1g-dev libgmp3-dev ${{ matrix.compiler-version.cc }}
mkdir /home/runner/work/downward/lib
mkdir /home/runner/lib

# We only want to set up Osi if both LP solvers are set, hence
# we execute the following three steps only if both secrets
Expand All @@ -63,15 +68,15 @@ jobs:
run: |
# We redirect output of wget to hide the secret URLs.
wget -O soplex-3.1.1.tgz $SOPLEX_URL &> /dev/null
tar xvzf soplex-3.1.1.tgz
tar xzf soplex-3.1.1.tgz
cd soplex-3.1.1
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="$DOWNWARD_SOPLEX_ROOT" ..
make
make install
cd ../../
rm -r soplex-3.1.1
rm -r soplex-3.1.1.tgz soplex-3.1.1

- name: Install Osi
if: ${{ env.CPLEX_URL != 0 && env.SOPLEX_URL != 0 }}
Expand Down Expand Up @@ -110,7 +115,6 @@ jobs:
# archive the entire lib directory of Osi because we need all
# 4 large library files and several file links to these.
run: |
cd ../
silvansievers marked this conversation as resolved.
Show resolved Hide resolved
libs=""
if [[ ! -z "${CPLEX_URL}" || ! -z "${SOPLEX_URL}" ]]; then
libs="${libs} lib/coin/lib/"
Expand All @@ -119,14 +123,15 @@ jobs:
libs="${libs} lib/ibm/ILOG/CPLEX_Studio129/cplex/bin/x86-64_linux/libcplex1290.so"
fi

tar cfz archive.tar.gz downward/fast-downward.py downward/driver downward/misc downward/builds/debug/bin/ downward/builds/release/bin/ ${libs}
# Handle libs first because tar complains when no files follow the last --directory option.
tar cfz archive.tar.gz --directory /home/runner ${libs} --directory ${GITHUB_WORKSPACE} fast-downward.py driver misc builds/debug/bin/ builds/release/bin/

- name: Upload archive
if: ${{ matrix.compiler-version.cc == 'gcc' }}
uses: actions/upload-artifact@master
with:
name: compiled-planner-${{ matrix.ubuntu-version }}
path: /home/runner/work/downward/archive.tar.gz
path: archive.tar.gz
retention-days: 1


Expand Down Expand Up @@ -182,10 +187,8 @@ jobs:
# during compilation.
run: |
tar xfz archive.tar.gz
shopt -s dotglob
mv downward/* .
if [[ ! -z "${CPLEX_URL}" || ! -z "${SOPLEX_URL}" ]]; then
mv lib/ ../
mv lib/ /home/runner
silvansievers marked this conversation as resolved.
Show resolved Hide resolved
fi

- name: Run driver, translator and search tests
Expand Down