Skip to content

Pre-release

Pre-release #8

Workflow file for this run

name: Pre-release
on:
workflow_dispatch:
jobs:
build:
name: Build
# https://github.com/actions/virtual-environments/
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
# https://github.com/marketplace/actions/setup-go-environment
- name: 🔧 Setup go
uses: actions/setup-go@v4
with:
go-version-file: 'gcosts/go.mod'
cache-dependency-path: 'gcosts/go.sum'
- name: 🍳 Build gcosts
run: cd gcosts && bash build.sh
# Test binary
- name: 🌡️ Test
run: cd gcosts && ./gcosts help
- name: 🌡️ Test gcosts region
run: cd gcosts && ./gcosts region -p ../pricing.yml
- name: 🌡️ Test gcosts compute instance
run: cd gcosts && ./gcosts compute instance -p ../pricing.yml
- name: 🌡️ Test gcosts calc
run: cd gcosts && ./gcosts calc -d ../t -p ../pricing.yml
# Upload binaries
# https://github.com/marketplace/actions/upload-a-build-artifact
- name: 📤 Upload
uses: actions/upload-artifact@v3
with:
name: gcosts-artifact
path: gcosts/gcosts-*
retention-days: 1
test-linux:
name: Test Linux
needs: build
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
# Download binaries
# https://github.com/marketplace/actions/download-a-build-artifact
- name: 📥 Download
uses: actions/download-artifact@v3
with:
name: gcosts-artifact
# Test binary
- name: 🌡️ Test
run: chmod +x gcosts-linux-x86_64 && ./gcosts-linux-x86_64 help
test-macos:
name: Test macOS
needs: build
runs-on: macos-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
- name: 📥 Download
uses: actions/download-artifact@v3
with:
name: gcosts-artifact
# Test binary
- name: 🌡️ Test
run: chmod +x gcosts-macos-x86_64 && ./gcosts-macos-x86_64 help
test-windows:
name: Test Windows
needs: build
runs-on: windows-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
- name: 📥 Download
uses: actions/download-artifact@v3
with:
name: gcosts-artifact
# Test binary
- name: 🌡️ Test
run: .\gcosts-windows-x86_64.exe help