Skip to content

Commit

Permalink
github actions cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sol-vin committed Sep 3, 2023
1 parent cf3cc4f commit 8d819a3
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 18 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,31 @@ jobs:
runs-on: windows-latest
steps:
- name: Download source
uses: actions/checkout@v2
uses: actions/checkout@v2\
- name: Install scoop 1
run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- name: Install scoop 2
run: irm get.scoop.sh -outfile 'install.ps1'
- name: Install scoop 3
run: .\install.ps1 -RunAsAdmin
- name: set scoop env
run: |
echo ("PATH=" + $env:PATH + ";" + $home + "\scoop\shims") >> $env:GITHUB_ENV
- name: Install crystal 1
run: C:\Users\runneradmin\scoop\shims\scoop.cmd bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
- name: Install crystal 2
run: C:\Users\runneradmin\scoop\shims\scoop.cmd install vs_2022_cpp_build_tools
run: scoop install vs_2022_cpp_build_tools
- name: Install crystal 3
run: C:\Users\runneradmin\scoop\shims\scoop.cmd install crystal
run: scoop install crystal
- name: shards install
run: C:\Users\runneradmin\scoop\shims\shards install
run: shards install
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: raylib-cr post-install
run: powershell rsrc/install-ga.ps1
- name: set env
run: |
echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs;C:\Users\runneradmin\scoop\shims") >> $env:GITHUB_ENV
- name: check env
run: |
echo $env:LIB
echo $env:PATH
echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
- name: Build examples
run: C:\Users\runneradmin\scoop\shims\crystal run rsrc/build-examples/build.cr
run: crystal run rsrc/build-examples/build.cr
2 changes: 1 addition & 1 deletion github-workflows/ubuntu-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Cleanup rsrc
run: rm -rf bin/rsrc/_dev
- name: Zip files
run: zip -r prerelease.zip bin/**
run: zip -r ubuntu-prerelease.zip bin/**

- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand Down
2 changes: 1 addition & 1 deletion github-workflows/ubuntu-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Cleanup rsrc
run: rm -rf bin/rsrc/_dev
- name: Zip files
run: zip -r release.zip bin/**
run: zip -r ubuntu-release.zip bin/**

- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand Down
13 changes: 8 additions & 5 deletions github-workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ jobs:
run: irm get.scoop.sh -outfile 'install.ps1'
- name: Install scoop 3
run: .\install.ps1 -RunAsAdmin
- name: set scoop env
run: |
echo ("PATH=" + $env:PATH + ";" + $home + "\scoop\shims") >> $env:GITHUB_ENV
- name: Install crystal 1
run: C:\Users\runneradmin\scoop\shims\scoop.cmd bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
- name: Install crystal 2
run: C:\Users\runneradmin\scoop\shims\scoop.cmd install vs_2022_cpp_build_tools
run: scoop install vs_2022_cpp_build_tools
- name: Install crystal 3
run: C:\Users\runneradmin\scoop\shims\scoop.cmd install crystal
run: scoop install crystal
- name: shards install
run: C:\Users\runneradmin\scoop\shims\shards install
run: shards install
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: raylib-cr post-install
Expand All @@ -35,4 +38,4 @@ jobs:
echo $env:PATH
- name: shards build
run: |
C:\Users\runneradmin\scoop\shims\shards build
shards build
48 changes: 48 additions & 0 deletions github-workflows/windows-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Windows - Deploy Docs
on: [push, pull_request]
jobs:
build:
name: Windows - Deploy Docs
runs-on: windows-latest
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install scoop 1
run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- name: Install scoop 2
run: irm get.scoop.sh -outfile 'install.ps1'
- name: Install scoop 3
run: .\install.ps1 -RunAsAdmin
- name: set scoop env
run: |
echo ("PATH=" + $env:PATH + ";" + $home + "\scoop\shims") >> $env:GITHUB_ENV
- name: Install crystal 1
run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
- name: Install crystal 2
run: scoop install vs_2022_cpp_build_tools
- name: Install crystal 3
run: scoop install crystal
- name: shards install
run: shards install
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: raylib-cr post-install
run: powershell lib/raylib-cr/rsrc/install-lib.ps1
- name: set env
run: |
echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
- name: check env
run: |
echo $env:LIB
echo $env:PATH
- name: make site
run: |
crystal docs
- name: Deploy docs
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61 changes: 61 additions & 0 deletions github-workflows/windows-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Windows - Pre Release
on: [push, pull_request]
jobs:
build:
name: Windows - Pre Release
runs-on: windows-latest
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install scoop 1
run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- name: Install scoop 2
run: irm get.scoop.sh -outfile 'install.ps1'
- name: Install scoop 3
run: .\install.ps1 -RunAsAdmin
- name: set scoop env
run: |
echo ("PATH=" + $env:PATH + ";" + $home + "\scoop\shims") >> $env:GITHUB_ENV
- name: Install crystal 1
run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
- name: Install crystal 2
run: scoop install vs_2022_cpp_build_tools
- name: Install crystal 3
run: scoop install crystal
- name: shards install
run: shards install
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: raylib-cr post-install
run: powershell lib/raylib-cr/rsrc/install-lib.ps1
- name: set env
run: |
echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
- name: check env
run: |
echo $env:LIB
echo $env:PATH
- name: shards build
run: |
shards build --release
- name: git lfs fetch
run: git lfs fetch
- name: git lfs checkout
run: git lfs checkout
- name: Copy rsrc
run: |
$ErrorActionPreference= 'silentlycontinue'
mkdir bin/rsrc
copy rsrc/* bin/rsrc
del bin/rsrc/_dev
- name: Zip
run: Compress-Archive -Path "bin/*" -DestinationPath windows-prerelease.zip
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Nightly"
files: |
windows-prerelease.zip
63 changes: 63 additions & 0 deletions github-workflows/windows-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Windows - Release
on:
push:
tags:
- "v*"
jobs:
build:
name: Windows - Release
runs-on: windows-latest
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install scoop 1
run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- name: Install scoop 2
run: irm get.scoop.sh -outfile 'install.ps1'
- name: Install scoop 3
run: .\install.ps1 -RunAsAdmin
- name: set scoop env
run: |
echo ("PATH=" + $env:PATH + ";" + $home + "\scoop\shims") >> $env:GITHUB_ENV
- name: Install crystal 1
run: scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal
- name: Install crystal 2
run: scoop install vs_2022_cpp_build_tools
- name: Install crystal 3
run: scoop install crystal
- name: shards install
run: scoop install
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: raylib-cr post-install
run: powershell lib/raylib-cr/rsrc/install-lib.ps1
- name: set env
run: |
echo ("LIB=" + $env:LIB + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
echo ("PATH=" + $env:PATH + ";" + $pwd + "\libs") >> $env:GITHUB_ENV
- name: check env
run: |
echo $env:LIB
echo $env:PATH
- name: shards build
run: |
shards build --release
- name: git lfs fetch
run: git lfs fetch
- name: git lfs checkout
run: git lfs checkout
- name: Copy rsrc
run: |
$ErrorActionPreference= 'silentlycontinue'
mkdir bin/rsrc
copy rsrc/* bin/rsrc
del bin/rsrc/_dev
- name: Zip
run: Compress-Archive -Path "bin/*" -DestinationPath windows-prerelease.zip

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
windows-release.zip

0 comments on commit 8d819a3

Please sign in to comment.