Cosmos-Server/.circleci/config.yml

88 lines
2.4 KiB
YAML
Raw Normal View History

2023-03-10 20:59:56 +00:00
version: 2
jobs:
2023-03-10 21:03:20 +00:00
build: # name of your job
machine: # executor type
image: ubuntu-2004:202010-01 # # recommended linux image - includes Ubuntu 20.04, docker 19.03.13, docker-compose 1.27.4
2023-03-10 20:59:56 +00:00
steps:
- checkout
2023-03-10 21:03:20 +00:00
- run:
name: install dependencies
command: sudo apt-get install bash curl
- run:
name: download Go
command: wget https://golang.org/dl/go1.20.2.linux-amd64.tar.gz
- run:
name: install Go
command: sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
- run:
name: set Go path
command: echo 'export PATH=$PATH:/usr/local/go/bin' >> $BASH_ENV
2023-03-10 20:59:56 +00:00
2023-03-12 18:31:20 +00:00
2023-03-12 18:29:43 +00:00
- run:
name: Swap node versions
command: |
2023-03-12 18:30:11 +00:00
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v16
2023-03-12 18:32:55 +00:00
nvm use 16
2023-03-12 18:17:28 +00:00
2023-03-12 18:31:20 +00:00
- run:
name: Check Node Version
command: node -v
2023-03-10 20:59:56 +00:00
- run:
name: Install GuPM
2023-03-10 21:03:20 +00:00
command: curl -fsSL https://azukaar.github.io/GuPM/install.sh | bash
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
2023-03-10 20:59:56 +00:00
- run:
2023-03-12 18:19:18 +00:00
name: Install Go provider
2023-03-10 21:03:20 +00:00
command: ~/.gupm/gupm/g plugin install https://azukaar.github.io/GuPM-official/repo:provider-go
2023-03-10 20:59:56 +00:00
2023-03-12 18:19:18 +00:00
- run:
name: Install NPM provider
command: ~/.gupm/gupm/g plugin install https://azukaar.github.io/GuPM-official/repo:provider-npm
2023-03-10 21:03:20 +00:00
- run:
name: Install dependencies
command: ~/.gupm/gupm/g make
2023-03-12 18:17:28 +00:00
- run:
name: Build UI
2023-03-12 18:18:46 +00:00
command: ~/.gupm/gupm/g vite build
2023-03-12 18:17:28 +00:00
2023-03-10 20:59:56 +00:00
- run:
name: Build Linux (ARM)
2023-03-10 21:03:20 +00:00
command: ~/.gupm/gupm/g ci/build linux arm64
2023-03-10 20:59:56 +00:00
- run:
name: Build docker (ARM)
2023-03-10 21:03:20 +00:00
command: ~/.gupm/gupm/g docker arm64
2023-03-10 20:59:56 +00:00
- run:
name: Build Linux
2023-03-10 21:03:20 +00:00
command: ~/.gupm/gupm/g ci/build linux amd64
2023-03-10 20:59:56 +00:00
- run:
name: Build docker
2023-03-10 21:03:20 +00:00
command: ~/.gupm/gupm/g docker
2023-03-10 20:59:56 +00:00
workflows:
version: 2
build-all:
jobs:
- build:
filters:
branches:
only:
- master