removing solana-main.yml
require some more modification to migrate from travis ci to github actions
This commit is contained in:
parent
676a535097
commit
6f6a42f174
|
@ -1,180 +0,0 @@
|
||||||
name : minimal
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [master]
|
|
||||||
tags : /^v\d+\.\d+/
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["solana_main"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
jobs:
|
|
||||||
Export_Github_Repositories:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
VERCEL_TOKEN: ${{secrets.VERCEL_TOKEN}}
|
|
||||||
GITHUB_TOKEN: ${{secrets.PAT}}
|
|
||||||
COMMIT_RANGE: ${{ github.event.before}}...${{ github.event.after}}
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
GITHUB_TOKEN: ${{secrets.PAT}}
|
|
||||||
if: ${{ github.event_name == 'push' || 'cron'&& github.ref == 'refs/heads/master'}}
|
|
||||||
- name: cmd
|
|
||||||
run : |
|
|
||||||
.travis/export-github-repo.sh web3.js/ solana-web3.js
|
|
||||||
macos-artifacts:
|
|
||||||
needs: [Export_Github_Repositories]
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
runs-on: macos-latest
|
|
||||||
if : ${{ github.event_name == 'api' || 'cron' || startsWith(github.ref, 'refs/tags/v')}}
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Setup | Rust
|
|
||||||
uses: ATiltedTree/setup-rust@v1
|
|
||||||
with:
|
|
||||||
rust-version: stable
|
|
||||||
- name: release artifact
|
|
||||||
run: |
|
|
||||||
source ci/rust-version.sh
|
|
||||||
brew install coreutils
|
|
||||||
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
|
|
||||||
greadlink -f .
|
|
||||||
source ci/env.sh
|
|
||||||
rustup set profile default
|
|
||||||
ci/publish-tarball.sh
|
|
||||||
shell: bash
|
|
||||||
- name: Cache modules
|
|
||||||
uses: actions/cache@master
|
|
||||||
id: yarn-cache
|
|
||||||
with:
|
|
||||||
path: node_modules
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: ${{ runner.os }}-yarn-
|
|
||||||
- uses: ochanje210/simple-s3-upload-action@master
|
|
||||||
with:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
|
|
||||||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|
|
||||||
SOURCE_DIR: 'travis-s3-upload'
|
|
||||||
DEST_DIR: 'giitsol'
|
|
||||||
windows-artifact:
|
|
||||||
needs: [Export_Github_Repositories]
|
|
||||||
runs-on: windows-latest
|
|
||||||
if : ${{ github.event_name == 'api' || 'cron'|| startsWith(github.ref, 'refs/tags/v')}}
|
|
||||||
steps:
|
|
||||||
- name: release artifact
|
|
||||||
run: |
|
|
||||||
choco install llvm --force -y
|
|
||||||
choco install openssl cmake make -y
|
|
||||||
refreshenv
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- run: |
|
|
||||||
bash ci/rust-version.sh
|
|
||||||
readlink -f .
|
|
||||||
bash ci/env.sh
|
|
||||||
export CI_BRANCH="v1.8.99"
|
|
||||||
export CI_TAG="v1.8.99"
|
|
||||||
export OPENSSL_DIR="C:\Program Files\OpenSSL-Win64"
|
|
||||||
export PATH="C:\Program Files\LLVM\bin:$PATH"
|
|
||||||
export LIBCLANG_PATH="C:\Program Files\LLVM\bin"
|
|
||||||
echo $PATH
|
|
||||||
rustup set profile default
|
|
||||||
bash ci/publish-tarball.sh
|
|
||||||
export OPENSSL_DIR="C:\Program Files\OpenSSL-Win64"
|
|
||||||
export PATH="C:\Program Files\LLVM\bin:$PATH"
|
|
||||||
shell: bash
|
|
||||||
- name: Cache modules
|
|
||||||
uses: actions/cache@v1
|
|
||||||
id: yarn-cache
|
|
||||||
with:
|
|
||||||
path: node_modules
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: ${{ runner.os }}-yarn-
|
|
||||||
- name: Config. aws cred
|
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: us-east-2
|
|
||||||
- name: Deploy
|
|
||||||
uses: ochanje210/simple-s3-upload-action@master
|
|
||||||
with:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
|
|
||||||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|
|
||||||
SOURCE_DIR: 'travis-s3-upload'
|
|
||||||
DEST_DIR: 'giitsol'
|
|
||||||
Docs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
- name: docs
|
|
||||||
env:
|
|
||||||
VERCEL_TOKEN: ${{secrets.VERCEL_TOKEN}}
|
|
||||||
GITHUB_TOKEN: ${{secrets.PAT_NEW}}
|
|
||||||
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
|
||||||
GITHUB_EVENT_AFTER: ${{ github.event.after }}
|
|
||||||
COMMIT_RANGE: ${{ github.event.before}}...${{ github.event.after}}
|
|
||||||
if: ${{github.event_name == 'pull_request' || 'push' || startsWith(github.ref, 'refs/tags/v')}}
|
|
||||||
run: |
|
|
||||||
touch .env
|
|
||||||
echo "COMMIT_RANGE=($COMMIT_RANGE)" > .env
|
|
||||||
source ci/env.sh
|
|
||||||
.travis/channel_restriction.sh edge beta || exit 0
|
|
||||||
.travis/affects.sh docs/ .travis || exit 0
|
|
||||||
cd docs/
|
|
||||||
source .travis/before_install.sh
|
|
||||||
source .travis/script.sh
|
|
||||||
- name: setup-node
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: setup-node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: 'lts/*'
|
|
||||||
- name: Cache
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.OS }}-npm-cache-2
|
|
||||||
|
|
||||||
auto_bump:
|
|
||||||
needs: [windows-artifact,macos-artifacts]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name : checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: '0'
|
|
||||||
- name: Bump version and push tag
|
|
||||||
uses: anothrNick/github-tag-action@1.26.0
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
WITH_V: true
|
|
||||||
DEFAULT_BUMP: patch
|
|
||||||
notify :
|
|
||||||
name : notify on slack
|
|
||||||
runs-on : ubuntu-latest
|
|
||||||
needs: [ Export_Github_Repositories,macos-artifacts,windows-artifact ]
|
|
||||||
if : ${{github.event_name != 'pull_request'}}
|
|
||||||
steps:
|
|
||||||
- uses: abinoda/slack-action@master
|
|
||||||
env :
|
|
||||||
SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN}}
|
|
||||||
with:
|
|
||||||
args: '{\"channel\":\"C02NQ8TJV8A\",\"text\":\"build success of solana main\"}'
|
|
||||||
if : success()
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue