mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-13 01:21:38 -07:00
Setup POC nightly.yml
This commit is contained in:
committed by
Mikkel Hjortshoej
parent
df80e8752b
commit
c9bec10a8e
@@ -2,11 +2,10 @@ name: Nightly
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build_windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Install cURL
|
||||
run: choco install curl
|
||||
- name: Download and unpack LLVM bins
|
||||
@@ -25,22 +24,100 @@ jobs:
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
||||
odin run examples/demo/demo.odin
|
||||
- name: Copy artifacts
|
||||
run: |
|
||||
mkdir dist
|
||||
cp odin.exe dist
|
||||
cp -r shared dist
|
||||
cp -r core dist
|
||||
cp -r bin dist
|
||||
cp -r examples dist
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: exe
|
||||
path: odin.exe
|
||||
name: windows_artifacts
|
||||
path: dist
|
||||
build_ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: (Linux) Download LLVM
|
||||
run: sudo apt-get install llvm
|
||||
- name: build odin
|
||||
run: make release
|
||||
- name: Odin run
|
||||
run: ./odin run examples/demo/demo.odin
|
||||
- name: Copy artifacts
|
||||
run: |
|
||||
mkdir dist
|
||||
cp odin dist
|
||||
cp -r shared dist
|
||||
cp -r core dist
|
||||
cp -r examples dist
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ubuntu_artifacts
|
||||
path: dist
|
||||
build_macos:
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Download LLVM and setup PATH
|
||||
run: |
|
||||
brew install llvm
|
||||
echo ::add-path::/usr/local/opt/llvm/bin
|
||||
echo ::set-env name=CPATH::`xcrun --show-sdk-path`/usr/include
|
||||
- name: build odin
|
||||
run: make release
|
||||
- name: Odin run
|
||||
run: ./odin run examples/demo/demo.odin
|
||||
- name: Copy artifacts
|
||||
run: |
|
||||
mkdir dist
|
||||
cp odin dist
|
||||
cp -r shared dist
|
||||
cp -r core dist
|
||||
cp -r examples dist
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: macos_artifacts
|
||||
path: dist
|
||||
upload_b2:
|
||||
runs-on: [linux]
|
||||
needs: [build]
|
||||
runs-on: [ubuntu-latest]
|
||||
needs: [build_windows, build_macos, build_ubuntu]
|
||||
steps:
|
||||
- name: Install B2 CLI
|
||||
shell: bash
|
||||
run: sudo pip install --upgrade b2
|
||||
- name: Download exe
|
||||
- name: Download Windows artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: exe
|
||||
name: windows_artifacts
|
||||
- name: Download Ubuntu artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: ubuntu_artifacts
|
||||
- name: Download macOS artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: macos_artifacts
|
||||
- name: List artifacts
|
||||
run: find . -type f -printf "%T@ %p\n" | sort -nr | cut -d\ -f2-
|
||||
- name: Create archieves
|
||||
run: |
|
||||
now=$(date +'%Y-%m-%d')
|
||||
7z a test/odin-windows-amd64-nightly+$now.zip windows_artifacts/*
|
||||
7z a test/odin-ubuntu-amd64-nightly+$now.zip ubuntu_artifacts/*
|
||||
7z a test/odin-macos-amd64-nightly+$now.zip macos_artifacts/*
|
||||
- name: Upload artifacts to b2
|
||||
shell: bash
|
||||
env:
|
||||
APPID: ${{ secrets.B2_APPID }}
|
||||
APPKEY: ${{ secrets.B2_APPKEY }}
|
||||
run: |
|
||||
b2 authorize-account "$APPID" "$APPKEY"
|
||||
b2 sync --delete test b2://odin-binaries/nightly
|
||||
b2 clear-account
|
||||
|
||||
|
||||
Reference in New Issue
Block a user