Skip to content

Commit

Permalink
AppVeyor artifacts and cache efficiency improvement (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBColton committed Oct 11, 2017
1 parent 103a599 commit 42ef5f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
@@ -1,21 +1,19 @@
sudo: required
dist: trusty

notifications:
irc: "chat.freenode.net#enigma"

language: cpp

git:
depth: 1
compiler:
- gcc

before_install:
- sudo dpkg --add-architecture i386
- sudo apt-get -qq update
- sudo apt-get -qq -y install build-essential libglu1-mesa-dev zlib1g-dev libalure-dev libvorbisfile3 libvorbis-dev
libdumb1-dev libboost-all-dev libc++-dev libsfml-dev libgtk2.0-dev libbullet-dev libbox2d-dev libgme-dev gcc-multilib
libdumb1-dev libc++-dev libsfml-dev libgtk2.0-dev libbullet-dev libbox2d-dev libgme-dev gcc-multilib
g++-multilib libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1-dev libglu1-mesa:i386 libx11-6:i386 libc++-dev:i386
mingw-w64 wine
mingw-w64 wine libboost-dev libboost-iostreams-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev

# Ubuntu is a turd
- sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Expand Down
25 changes: 13 additions & 12 deletions appveyor.yml
Expand Up @@ -2,9 +2,10 @@
shallow_clone: true
# disable automatic tests
test: off

environment:
OUTPUT: /tmp/test.exe
BLOBS_URL: "https://ci.appveyor.com/api/projects/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%/artifacts/blobs.zip?all=true^&\
job=Environment%3A%20COMPILER%3Dgcc%2C%20PLATFORM%3DWin32%2C%20MODE%3DRun%2C%20GRAPHICS%3DDirect3D9%2C%20AUDIO%3DNone%2C%20COLLISION%3DNone%2C%20NETWORK%3DNone%2C%20WIDGETS%3DNone%2C%20EXTENSIONS%3DNone"
matrix:
#BEGIN WINDOWS
# Game Modes
Expand All @@ -23,15 +24,6 @@ environment:
- {COMPILER: gcc, PLATFORM: Win32, MODE: Debug, GRAPHICS: Direct3D9, AUDIO: None, COLLISION: None, NETWORK: None, WIDGETS: None, EXTENSIONS: "XInput"}
- {COMPILER: gcc, PLATFORM: Win32, MODE: Debug, GRAPHICS: Direct3D9, AUDIO: None, COLLISION: None, NETWORK: None, WIDGETS: None, EXTENSIONS: "MediaControlInterface"}
#END WINDOWS
cache:
- compileEGMf.dll
- emake.exe
- '%PROGRAMDATA%\ENIGMA'
init:
# job numbers are 1-n (i.e. not zero-based)
# don't use the cache on the first job so we can build a fresh compileEGMf.dll and emake.exe
# then restore it on the subsequent jobs
- IF %APPVEYOR_JOB_NUMBER% == 1 (set APPVEYOR_CACHE_SKIP_RESTORE=true)
install:
- set PATH=c:\msys64;C:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%
- set MSYSTEM=MINGW64
Expand All @@ -48,8 +40,17 @@ install:
mingw-w64-x86_64-sfml mingw-w64-x86_64-gtk2 mingw-w64-x86_64-box2d mingw-w64-x86_64-bullet
- gcc -v
- cd %APPVEYOR_BUILD_FOLDER%
- IF NOT EXIST compileEGMf.dll make -j 4
- IF NOT EXIST emake.exe bash -lc "cd $APPVEYOR_BUILD_FOLDER; make -j 4 emake"
- IF %APPVEYOR_JOB_NUMBER% == 1 (
make -j 4 &&
bash -lc "cd $APPVEYOR_BUILD_FOLDER; make -j 4 emake" &&
7z a blobs.zip compileEGMf.dll emake.exe &&
appveyor PushArtifact blobs.zip -Type Zip
) ELSE (
echo curl -L %BLOBS_URL% > blobs.zip &&
curl -L %BLOBS_URL% > blobs.zip &&
dir &&
7z x blobs.zip
)
build_script:
# AppVeyor overrides PLATFORM because it's part of its API
- bash -lc "cd $APPVEYOR_BUILD_FOLDER; export PLATFORM=%PLATFORM%; ./ci-build.sh"

0 comments on commit 42ef5f0

Please sign in to comment.