icestudio #791
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'icestudio' | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 3,6' | |
workflow_dispatch: | |
env: | |
CI: true | |
DOCKER_BUILDKIT: 1 | |
jobs: | |
doc: | |
runs-on: ubuntu-latest | |
name: '📓 Docs' | |
steps: | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v2 | |
- name: '🐍 Setup Python' | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: '📓 BuildTheDocs (BTD)' | |
uses: buildthedocs/btd@v0 | |
with: | |
token: ${{ github.token }} | |
- name: '📤 Upload artifact: HTML' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docs | |
path: docs/_build/html | |
linwin: | |
needs: [doc] | |
strategy: | |
fail-fast: false | |
max-parallel: 2 | |
matrix: | |
include: | |
[ | |
{label: '🐧 Ubuntu', os: ubuntu, arg: lin, larg: linux}, | |
{label: '🧊 Windows', os: windows, arg: win, larg: win}, | |
] | |
runs-on: ${{ matrix.os }}-latest | |
name: ${{ matrix.label }} | |
steps: | |
- name: '⚙️ git config autocrlf' | |
run: git config --global core.autocrlf input | |
shell: bash | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v2 | |
- name: '⚙️ Setup Node.js' | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '10.x' | |
- name: 'Certs' | |
if: matrix.os == 'ubuntu' | |
run: | | |
sudo apt update | |
sudo apt install -y ca-certificates | |
sudo update-ca-certificates | |
- name: '🟦 Setup MSYS2' | |
if: matrix.os == 'windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: true | |
install: git | |
- name: '▶️ submodule' | |
if: matrix.os == 'windows' | |
shell: msys2 {0} | |
run: git submodule update --init --recursive | |
- name: '▶️ submodule' | |
if: matrix.os == 'ubuntu' | |
run: git submodule update --init --recursive | |
- name: '▶️ yarn' | |
shell: bash | |
run: ./getdeps.sh | |
- name: '▶️ check' | |
run: yarn run check | |
- name: '📥 Download artifact: HTML' | |
uses: actions/download-artifact@v2 | |
with: | |
name: docs | |
path: docs/_build/html | |
- name: '▶️ dist' | |
run: yarn dist -v | |
env: | |
DIST_TARGET: ${{ matrix.arg }} | |
- name: '📤 Upload artifact: 64 bit' | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{ matrix.arg }}64 | |
path: dist/*${{ matrix.larg }}64.zip | |
- name: '📤 Upload artifact: 32 bit' | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{ matrix.arg }}32 | |
path: dist/*${{ matrix.larg }}32.zip | |
mac: | |
needs: [doc] | |
strategy: | |
fail-fast: false | |
max-parallel: 2 | |
matrix: | |
include: [{ver: '10.15', name: Catalina}, {ver: '11.0', name: BigSur}] | |
runs-on: macos-${{ matrix.ver }} | |
name: '🍎 macOS · ${{ matrix.name }}' | |
steps: | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: '⚙️ Setup Node.js' | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '10.x' | |
- name: '▶️ yarn' | |
run: ./getdeps.sh | |
- name: '▶️ check' | |
run: yarn run check | |
- name: '📥 Download artifact: HTML' | |
uses: actions/download-artifact@v2 | |
with: | |
name: docs | |
path: docs/_build/html | |
- name: '▶️ dist' | |
run: yarn dist -v | |
env: | |
DIST_TARGET: osx | |
- name: '📤 Upload artifact: 64 bit' | |
uses: actions/upload-artifact@master | |
with: | |
name: osx64-${{ matrix.name }} | |
path: dist/*osx64.zip | |
nightly: | |
needs: [linwin, mac] | |
if: github.ref == 'refs/heads/moon' && github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
name: '📦 Nightly' | |
steps: | |
- name: '📥 Download artifacts' | |
uses: actions/download-artifact@v2 | |
- name: Append GITHUB_SHA to release assets | |
run: | | |
for item in lin32/* lin64/* win32/* win64/*; do | |
mv "$item" "${item%.*}-${GITHUB_SHA}.zip" | |
done | |
for name in Catalina BigSur; do | |
item="$(ls osx64-$name/*)" | |
mv "$item" "${item%.*}-$name-${GITHUB_SHA}.zip" | |
done | |
- name: '📦 Run pyTooling/Actions/releaser' | |
uses: pyTooling/Actions/releaser@r0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: 'nightly' | |
rm: true | |
files: | | |
lin32/* | |
lin64/* | |
win32/* | |
win64/* | |
osx64-Catalina/* | |
osx64-BigSur/* |