72 lines
2.4 KiB
YAML
72 lines
2.4 KiB
YAML
name: Test Hero & Release to S3
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
|
|
on:
|
|
push:
|
|
branches: ["development","main"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- target: x86_64-unknown-linux-musl
|
|
os: ubuntu-latest
|
|
short-name: linux-i64
|
|
# - target: aarch64-unknown-linux-musl
|
|
# os: ubuntu-latest
|
|
# short-name: linux-arm64
|
|
# - target: aarch64-apple-darwin
|
|
# os: macos-latest
|
|
# short-name: macos-arm64
|
|
# - target: x86_64-apple-darwin
|
|
# os: macos-latest
|
|
# short-name: macos-i64
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
|
|
- run: echo "🔎 The name of your branch is ${{ github.ref_name }} and your repository is ${{ github.repository }}."
|
|
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Vlang
|
|
run: ./install_v.sh
|
|
|
|
- name: Setup Herolib
|
|
run: ./install_herolib.vsh
|
|
|
|
- name: Install and Start Redis
|
|
run: |
|
|
# Import Redis GPG key
|
|
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
|
|
# Add Redis repository
|
|
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
|
|
# Install Redis
|
|
sudo apt-get update
|
|
sudo apt-get install -y redis
|
|
# Print versions
|
|
redis-cli --version
|
|
redis-server --version
|
|
# Start Redis
|
|
sudo systemctl start redis-server
|
|
redis-cli ping
|
|
|
|
- name: Do all the basic tests
|
|
run: ./test_basic.vsh
|
|
|
|
# - name: Upload to S3
|
|
# run: |
|
|
# echo 'export S3KEYID=${{ secrets.S3KEYID }}' > ${HOME}/mysecrets.sh
|
|
# echo 'export S3APPID=${{ secrets.S3APPID }}' >> ${HOME}/mysecrets.sh
|
|
# set -e && cat ${HOME}/mysecrets.sh
|
|
# sudo bash +x scripts/githubactions.sh
|
|
|
|
- name: Extract tag name
|
|
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|