diff --git a/.appveyor.yml b/.appveyor.yml index f33165a..f89cf55 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,14 +27,12 @@ branches: install: - set APPVEYOR_BUILD_DIR=$(cygpath -u '%APPVEYOR_BUILD_FOLDER%') - git submodule update --init --recursive - - > - sh -c " - pacman --needed --noconfirm -S zip unzip base-devel %PACKAGES% && - curl -L http://bodge.borodust.org/files/install.sh | sh - " + - pacman --needed --noconfirm -S zip unzip base-devel %PACKAGES% + - curl -L http://bodge.borodust.org/files/install.sh | sh build_script: - set TARGET_ARTIFACT=lib%NAME%.dll.bodged-%TARGET_ARCH%-windows-%APPVEYOR_REPO_TAG_NAME% + - set TARGET_SPEC=%TARGET_ARTIFACT%-spec.zip - > sh -c " cd src/lib/ @@ -42,12 +40,15 @@ build_script: -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=ON -DLIBRARY_OUTPUT_PATH=$APPVEYOR_BUILD_FOLDER/src/lib/ -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_INSTALL=OFF -DGLFW_BUILD_EXAMPLES=OFF . - && make" + && make + && ~/.bodge/bin/lisp regen-local-spec-and-zip --arch %TARGET_ARCH% \"$(cygpath -u '%APPVEYOR_BUILD_FOLDER%')\" %ASDF_SYSTEM% \"$(cygpath -u '%APPVEYOR_BUILD_FOLDER%\%TARGET_SPEC%')\"" - mv %APPVEYOR_BUILD_FOLDER%\src\lib\lib%NAME%.dll.bodged %APPVEYOR_BUILD_FOLDER%\%TARGET_ARTIFACT% artifacts: - path: $(TARGET_ARTIFACT) name: target_artifact + - path: $(TARGET_SPEC) + name: target_spec deploy: provider: GitHub @@ -56,7 +57,7 @@ deploy: description: $(APPVEYOR_REPO_COMMIT_MESSAGE) auth_token: secure: Z5XWjDOBlCrmfz3SQAjnLKtdgI5B2b/owJhRPNWYGrI+qwVNbBc4cZiroBZReWP7 - artifact: target_artifact + artifact: target_artifact, target_spec force_update: true draft: false prerelease: false diff --git a/.travis.yml b/.travis.yml index a3b99da..38aa632 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ env: global: - NAME: glfw - ASDF_SYSTEM: bodge-glfw + - PATH: ~/.bodge/bin/:$PATH - secure: Yug8ZSWsbZKP6p5AbVZ3TG2XiukvZpZPc6K3er+b+576lYhJqgs9EI6wCMsfZtXV8A/Ez+49iW0dEBABOHCNe5mvX6Kr4vACoqywVmJ7IVvpt6hpqNjbQ/nMEdLaf/izxrnL8YKqU8qYcF+aJc4T3EOaz5nKgt2pfZuXgpwSbOhRhQbPxjJ45gyqvYJbccvk72h1WrFnU926EfQ7THb/7VHJLidH+eH5GE+mLj9NY1tZYqNI0LTApVkTBxkfvz8gAC8ZR30W/eitah/cEzBROuvmspvU8CpOib2sfQdm3XDJ0LMo7kwlfUbNshM9l2gNzruwWoDOEtGspnb4Rixll3ZzLFRrlTmlV2a2NfKLCcyeakvRiYzrmcZu8lr3Ve0pZ3WYP2c6a1CnU6FL6kVxEJ+D+EXJLmfIZbZDkxbV39ui+PgaRdQ/CUijVfyn/2XZf8FwJpdJhYSJyznPeAg+7C1U2ea+f2smoAHv/Y7TtetqQip/O8ycKnCfUT6TRZ5JRslY75s8qZE3Q/6XQWWfO3rigrGSKL5tuN4uoB3OM5JeN9m7p1ltklaXh6Mfiph8/WnLtlAFGKh2B9RuOPU3ffcIYudHIy7dVPuGkVwdvbQuroDQZEnrxO5ptefT8qlaKJzs/aczlgm9F6qKu1p/BS5XAJjvWj9g1oulWAwctRU= matrix: @@ -48,11 +49,11 @@ before_install: fi install: - - git submodule update --init --recursive - curl -L http://bodge.borodust.org/files/install.sh | sh - - ln -s $TRAVIS_BUILD_DIR/ ~/quicklisp/local-projects/$ASDF_SYSTEM script: + - export TARGET_FILE=$TRAVIS_BUILD_DIR/lib$NAME.$EXTENSION.bodged-$TARGET_ARCH-$TRAVIS_OS_NAME-$TRAVIS_BRANCH + - export TARGET_SPEC=$TARGET_FILE-spec.zip - > cd $TRAVIS_BUILD_DIR/src/lib/ && cmake -G "Unix Makefiles" \ -DCMAKE_C_FLAGS=$(CFLAGS) \ @@ -65,9 +66,9 @@ script: -DGLFW_INSTALL=OFF \ -DGLFW_BUILD_EXAMPLES=OFF . && \ make + - lisp regen-local-spec-and-zip --arch $TARGET_ARCH "$TRAVIS_BUILD_DIR" $ASDF_SYSTEM "$TARGET_SPEC" before_deploy: - - export TARGET_FILE=$TRAVIS_BUILD_DIR/lib$NAME.$EXTENSION.bodged-$TARGET_ARCH-$TRAVIS_OS_NAME-$TRAVIS_BRANCH - mv $TRAVIS_BUILD_DIR/src/lib/$OUTPUT_FILE $TARGET_FILE - > if [ "$TRAVIS_OS_NAME" = "linux" ]; then @@ -78,7 +79,7 @@ before_deploy: deploy: provider: releases api-key: $GITHUB_TOKEN - file: [$TARGET_FILE] + file: [$TARGET_FILE, $TARGET_SPEC] skip_cleanup: true overwrite: true on: diff --git a/util/regen-spec.lisp b/util/regen-spec.lisp deleted file mode 100644 index ebd5a3c..0000000 --- a/util/regen-spec.lisp +++ /dev/null @@ -1,2 +0,0 @@ -(script "install-testing-dist") -(script "regen-spec") diff --git a/util/update-specs.sh b/util/update-specs.sh index f6d2de4..997af75 100755 --- a/util/update-specs.sh +++ b/util/update-specs.sh @@ -1,37 +1,7 @@ #!/usr/bin/env bash -name=glfw -repository_url=https://github.com/borodust/bodge-glfw - - -if [[ -z $1 ]] ; then - echo "Version is not provided!" - exit 1; -fi - script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -declare -A platforms -platforms=(["linux"]="so" ["osx"]="dylib" ["windows"]="dll") - -declare -A archs -archs=(["x86_64"]="x86_64" ["i686"]="i686") - -for arch in "${!archs[@]}" ; do - for platform in "${!platforms[@]}" ; do - lib="lib$name.${platforms[$platform]}.bodged" - url="$repository_url/releases/download/$1/$lib-$arch-$platform-$1" - - spec_dir="$script_dir/" - spec_url="$url-spec.zip" - spec_archive=$(mktemp /tmp/$lib-spec.XXXXXXXX) - mkdir -p "$spec_dir" - - echo "Downloading $lib spec from $spec_url to $spec_archive" - if ! wget -O "$spec_archive" -q "$spec_url" ; then - echo "$lib spec download failed" - exit 1; - fi - ( cd $spec_dir && unzip -o $spec_archive ) - done -done +lisp download-specs --lib-postfix ".bodged" \ + glfw https://github.com/borodust/bodge-glfw \ + "$script_dir/../src/spec/" $1