Skip to content

Commit

Permalink
Use docker image to build binaries.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhett12321 committed Jan 14, 2021
1 parent 71bf7c2 commit 5366253
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions .github/workflows/build.yml
Expand Up @@ -25,6 +25,8 @@ env:
jobs:
build:
runs-on: ubuntu-18.04
container:
image: docker://nwnxee/builder:latest
steps:
- uses: actions/checkout@v2

Expand All @@ -36,27 +38,6 @@ jobs:
echo "::set-output name=nwn_build::$(grep 'set(TARGET_NWN_BUILD ' CMakeLists.txt | cut -d' ' -f2 | sed 's/)//')"
echo "::set-output name=nwn_build_revision::$(grep 'set(TARGET_NWN_BUILD_REVISION ' CMakeLists.txt | cut -d' ' -f2 | sed 's/)//')"
- name: Cache Additional Dependencies
uses: actions/cache@v2
id: dependencies-cache
with:
path: "~/dependencies"
key: dependencies-2020-11-16

- name: Install Cache Additional Dependencies
env:
CACHE_HIT: ${{steps.dependencies-cache.outputs.cache-hit}}
run: |
if [[ "$CACHE_HIT" == 'true' ]]; then
sudo cp --force --recursive ~/dependencies/* /
else
sudo apt-get install libhunspell-dev libluajit-5.1-dev ccache libmariadb-dev-compat
mkdir -p ~/dependencies
for dep in libhunspell-dev libluajit-5.1-dev ccache libmariadb-dev-compat libluajit-5.1-2 libluajit-5.1-common libmariadb-dev libmariadb-dev-compat libmariadb3; do
dpkg -L $dep | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/dependencies/
done
fi
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
Expand Down

0 comments on commit 5366253

Please sign in to comment.