1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-02-22 12:49:28 +00:00

98 lines
2.4 KiB
YAML
Raw Normal View History

2023-05-30 15:25:47 +02:00
name: CI
on:
2024-08-04 12:43:55 +02:00
- push
- pull_request
2023-05-30 15:25:47 +02:00
jobs:
build:
name: Build Rolens
strategy:
2023-05-30 21:03:36 +02:00
fail-fast: false
2023-05-30 15:25:47 +02:00
matrix:
2023-06-03 11:43:54 +02:00
platform:
- windows-2019
- windows-2022
- macos-13
2024-08-04 12:37:35 +02:00
- macos-14
2023-06-03 11:43:54 +02:00
- ubuntu-22.04
2024-08-04 12:37:35 +02:00
- ubuntu-24.04
2025-02-02 09:30:09 +01:00
go-version: [ 1.23.5 ]
node-version: [ 22 ]
2023-05-30 15:25:47 +02:00
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
2024-08-04 12:43:55 +02:00
uses: actions/checkout@v4
2023-05-30 15:25:47 +02:00
- name: Set up Go
2024-08-04 12:43:55 +02:00
uses: actions/setup-go@v5
2023-05-30 15:25:47 +02:00
with:
go-version: ${{ matrix.go-version }}
2023-05-30 21:52:54 +02:00
cache-dependency-path: go.sum
2023-05-30 15:25:47 +02:00
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Install build dependencies for macOS
if: contains(matrix.platform, 'macos')
run: npm install --global appdmg
- name: Install build dependencies for Linux
2023-06-03 11:43:54 +02:00
if: contains(matrix.platform, 'ubuntu')
2025-02-02 09:30:09 +01:00
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu
2023-06-02 17:29:35 +02:00
2023-05-30 15:25:47 +02:00
- name: Set up Node.js
2024-08-04 12:43:55 +02:00
uses: actions/setup-node@v4
2023-05-30 15:25:47 +02:00
with:
node-version: ${{ matrix.node-version }}
2023-05-30 21:52:54 +02:00
cache: npm
cache-dependency-path: frontend/package-lock.json
2023-05-30 15:25:47 +02:00
- name: Cross-compile Rolens for Windows
2023-06-03 11:43:54 +02:00
if: contains(matrix.platform, 'windows')
run: ./build/windows/ci_generate.ps1 -platform "${{ matrix.platform }}"
2023-05-30 15:25:47 +02:00
- name: Cross-compile Rolens for Darwin
2023-06-03 11:43:54 +02:00
if: contains(matrix.platform, 'macos')
run: ./build/darwin/ci_generate.sh "${{ matrix.platform }}"
- name: Cross-compile Rolens for Linux
2023-06-03 11:43:54 +02:00
if: contains(matrix.platform, 'ubuntu')
run: ./build/linux/ci_generate.sh "${{ matrix.platform }}"
- name: Upload generated binaries
2024-08-04 12:38:14 +02:00
uses: actions/upload-artifact@v4
with:
2023-06-03 11:43:54 +02:00
name: rolens-${{ matrix.platform }}
path: releases/*
- name: Test build script for users
2023-06-30 20:09:36 +02:00
run: node ./build.js
bundle:
name: Bundle artifacts
2025-02-02 09:30:09 +01:00
runs-on: ubuntu-24.04
2023-06-22 11:04:39 +02:00
needs: build
if: ${{ always() }}
steps:
2023-06-23 14:34:49 +02:00
- name: Checkout
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Place all tarballs in the same directory
2023-06-23 14:34:49 +02:00
run: build/ci_bundle.sh
- name: Upload the bundle as an artifact
2024-08-04 12:38:14 +02:00
uses: actions/upload-artifact@v4
with:
name: rolens-bundle
path: bundle