Usage of $TRAVIS_OS_NAME in .travis.yml - travis-ci

I want to test a project on multiple platforms, so I am using according to the docs os: and $TRAVIS_OS_NAME. But I seem to be missing something. My .travis.yml looks as follow:
os:
- osx
before_install:
- ./.travis.$TRAVIS_OS_NAME.before_install.sh
install:
- ./.travis.$TRAVIS_OS_NAME.install.sh
script:
- ./.travis.$TRAVIS_OS_NAME.script.sh
But i get the following error:
$ ./.travis.$TRAVIS_OS_NAME.before_install.sh
/home/travis/build.sh: line 41: ./.travis.linux.before_install.sh: No such file or directory
So it seems that the os: directive is ignored.
Am I missing something?
I have not included os: -linux as the tests scripts are not ready yet.

Related

Any workaround to the "Could not find prisma-fmt binary" error when installing KeystoneJS?

I'm running into this issue when trying to install KeystoneJS (tried locally with node and npm up to date and in a node:16-alpine docker image).
> keystone-app#1.0.0 postinstall
> keystone postinstall
Error: Could not find prisma-fmt binary. Searched in:
- /plur-cms/node_modules/#prisma/engines/prisma-fmt-debian-openssl-1.1.x
- /plur-cms/node_modules/#prisma/sdk/prisma-fmt-debian-openssl-1.1.x
- /plur-cms/node_modules/#prisma/prisma-fmt-debian-openssl-1.1.x
- /plur-cms/node_modules/#prisma/sdk/runtime/prisma-fmt-debian-openssl-1.1.x
at resolveBinary (/plur-cms/node_modules/#prisma/sdk/dist/resolveBinary.js:91:9)
at Object.formatSchema (/plur-cms/node_modules/#prisma/sdk/dist/engine-commands/formatSchema.js:41:25)
at getCommittedArtifacts (/plur-cms/node_modules/#keystone-6/core/dist/artifacts-f7bed9de.cjs.dev.js:398:13)
at Object.validateCommittedArtifacts (/plur-cms/node_modules/#keystone-6/core/dist/artifacts-f7bed9de.cjs.dev.js:417:21)
at postinstall (/plur-cms/node_modules/#keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.dev.js:619:5)
I have tried so far to update Prisma to the latest version, generate its binary, and place it into the correct folder for keystone. But after that keystone still doesn't run:
✨ Starting Keystone
⭐️ Dev Server Starting on http://localhost:5000
⭐️ GraphQL API Starting on http://localhost:5000/api/graphql
✨ Generating GraphQL and Prisma schemas
✨ The database is already in sync with the Prisma schema.
Error: Unknown binary target debian-openssl-3.0.x in generator client.
Possible binaryTargets: darwin, darwin-arm64, debian-openssl-1.0.x, debian-openssl-1.1.x, rhel-openssl-1.0.x, rhel-openssl-1.1.x, linux-arm64-openssl-1.1.x, linux-arm64-openssl-1.0.x, linux-arm-openssl-1.1.x, linux-arm-openssl-1.0.x, linux-musl, linux-nixos, windows, freebsd11, freebsd12, openbsd, netbsd, arm, native
at validateGenerators (/home/camopy/dev/plur-cms/node_modules/#prisma/sdk/dist/get-generators/getGenerators.js:318:17)
at getGenerators (/home/camopy/dev/plur-cms/node_modules/#prisma/sdk/dist/get-generators/getGenerators.js:122:3)
at Object.getGenerator (/home/camopy/dev/plur-cms/node_modules/#prisma/sdk/dist/get-generators/getGenerators.js:276:22)
at generatePrismaClient (/home/camopy/dev/plur-cms/node_modules/#keystone-6/core/dist/artifacts-f7bed9de.cjs.dev.js:522:21)
at async Promise.all (index 0)
at Object.generateNodeModulesArtifacts (/home/camopy/dev/plur-cms/node_modules/#keystone-6/core/dist/artifacts-f7bed9de.cjs.dev.js:518:3)
at async Promise.all (index 0)
at setupInitialKeystone (/home/camopy/dev/plur-cms/node_modules/#keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.dev.js:416:22)
at initKeystone (/home/camopy/dev/plur-cms/node_modules/#keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.dev.js:166:35)
Has any of you run into this already and found a workaround?
Or do you have a docker image with keystone 6 working?
You are running into this issue because the #prisma/client version doesn't seem to support OpenSSL 3.0.
You need to update to version 3.13.0 atleast. From version 3.13.0 prisma has added support for openssl 3.0.
Here are the release notes which mentions the same: Release notes

perlbrew switch path order not permanent on MacOS Big Sur 11.4

I'm writing a step-by-step instruction guide to installing perlbrew on a newly built (from ISO) MacOS Big Sur (11.4) VM running on VMware Fusion.
I have been able to successfully install perlbrew. Here is what perlbrew info looks like:
perlbrew info
Current perl:
Using system perl.
Shebang: #!/usr/bin/perl
perlbrew:
version: 0.92
ENV:
PERLBREW_ROOT: /Users/jblaty/perl5/perlbrew
PERLBREW_HOME: /Users/jblaty/.perlbrew
PERLBREW_PATH: /Users/jblaty/perl5/perlbrew/bin
PERLBREW_MANPATH:
Great! Now, I'll do perlbrew switch perl-5.32.1 and then another perlbrew info:
perlbrew info
Current perl:
Name: perl-5.32.1
Path: /Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin/perl
Config: -de -Dprefix=/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1 -Aeval:scriptdir=/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin
Compiled at: Jun 23 2021 14:43:45
perlbrew:
version: 0.92
ENV:
PERLBREW_ROOT: /Users/jblaty/perl5/perlbrew
PERLBREW_HOME: /Users/jblaty/.perlbrew
PERLBREW_PATH: /Users/jblaty/perl5/perlbrew/bin:/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin
PERLBREW_MANPATH: /Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/man
Super! So I'm now running the perlbrew version of Perl in the VM. Here is what the path looks like now that I've switched...
print $PATH
/Users/jblaty/perl5/perlbrew/bin:/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
AWESOME! So in the path, MacOS finds the perlbrew version before the system version of Perl. Everything looks great so far, but I expect that a perlbrew switch to be persistent to each new terminal session I start. Keep in mind that I'm using zsh, and my .zshenv looks like this:
cat .zshenv
source ~/perl5/perlbrew/etc/bashrc
However, here's where things break. If I close that terminal session and open a new one, and then do another perlbrew info, here's what I get:
perlbrew info
Current perl:
Name: perl-5.32.1
Path: /Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin/perl
Config: -de -Dprefix=/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1 -Aeval:scriptdir=/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin
Compiled at: Jun 23 2021 14:43:45
perlbrew:
version: 0.92
ENV:
PERLBREW_ROOT: /Users/jblaty/perl5/perlbrew
PERLBREW_HOME: /Users/jblaty/.perlbrew
PERLBREW_PATH: /Users/jblaty/perl5/perlbrew/bin:/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin
PERLBREW_MANPATH: /Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/man
...everything looks just fine, right? However, if I have another look at the path:
print $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jblaty/perl5/perlbrew/bin:/Users/jblaty/perl5/perlbrew/perls/perl-5.32.1/bin
WRONG! The perlbrew bin directories are appended to the end of the path, not the beginning as it was before I closed the terminal session, earlier.
Can anyone guide me as to:
What did I do wrong? Did I miss something in the install?
How do I fix perlbrew so the perlbrew bin paths gets prepended to the system paths in subsequent new terminal sessions?
I'm going to be creating instructions for Linux as well, so fixing this might help me understand what I need to do there.
Add the initialization script to ~/.zshrc.
echo 'source ~/perl5/perlbrew/etc/bashrc' >> ~/.zshrc
The zsh startup file order is:
/etc/zshenv
~/.zshenv
/etc/zprofile <- system PATH set here
~/.zprofile
/etc/zshrc
~/.zshrc
/etc/zlogin
~/zlogin

How to use environment variables in travis-ci

I am trying to get Travis-CI set up but builds are failing because the environment variables aren't getting set. The content of the .travis.yml file is below. I would expect the build log to show export REQ_FILE=... but it does not.
sudo: false
language: python
python:
- "2.7"
- "3.6"
env:
- REQ_FILE = "./ci/min_reqs.txt"
- REQ_FILE = "./ci/reqs.txt"
before_install:
- pip install -r $REQ_FILE
install:
- pip install .
script:
- tests/run_tests
Complete details:
https://github.com/NREL/rdtools/tree/setup_CI_md
https://travis-ci.org/NREL/rdtools/builds/405012012
You need to delete the spaces around the equals sign when you are setting your environment variables.
env:
- REQ_FILE="./ci/min_reqs.txt"
- REQ_FILE="./ci/reqs.txt"

I can't build android-27 , tool-27.0.2 with travis.CI

Can any one help me?
Stuck from my side.
https://travis-ci.org/XinyueZ/mvvm-template/jobs/313586340
I can 't build (./gradlew test) it.
my yml is:
language: android
android:
components:
- tools
- platform-tools
- build-tools-27.0.2
- android-27
- add-on
- extra
licenses:
- 'android-sdk-license-.+'
jdk:
- oraclejdk8
script:
- ./gradlew :repository:testMockDebugUnitTest :repository:testProdDebugUnitTest :repository:testProdReleaseUnitTest
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
buildToolsVersion = '27.0.2'
I have tried 27.0.1 as well, same failed.
I had one or three times successed, just 2 hours later, something went wrong.
same yml, no change.
See here
It seems Google uploaded a new version of the android-27 package and the checksum is now different and the download fails. For the moment, you need to install it yourself using the sdkmanager CLI instead. Here's what you would need to add to your .travis.yml file:
before_install:
- yes | sdkmanager "platforms;android-27"

The SDK directory does not exist Travis CI

I have this .travis.yml file, but I am constantly getting this error when building:
* What went wrong:
A problem occurred configuring project ':app'.
> The SDK directory '/home/travis/build/Me/MyProject/C:\Users\Me\AppData\Local\Android\Sdk' does not exist.
My .travis.yml
language: android
before_install:
- chmod +x gradlew
script:
- ./gradlew clean assembleDebug
install:
- true
- chmod +x ./gradlew; ls -l gradlew; ./gradlew wrapper -v
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - platform-tools
# - tools
# The BuildTools version used by your project
- build-tools-23.0.3
# The SDK version used to compile your project
- android-23
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-23
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-23
- sys-img-x86-android-17
I cannot find anything on google about it, so I don't know how to fix it
Do not commit your local.properties file into your repository.

Resources