Skip to content

Commit

Permalink
fix(BE): mac os build (#5)
Browse files Browse the repository at this point in the history
* doc: Update todo

* feat(FE): Extend form to accept SSL parameters

* feat(FE): Show cluster actions under endpoint in list

* test

* upload artifacts

* Win pipeline

* ci: back all together

* win version

* OMG winzooooz

* try win 2019

* try latest version

* try latest version

* try version 0.26

* use custom openssl

* only use windows

* rollback windows tests
  • Loading branch information
andrewinci authored Sep 23, 2022
1 parent 6f3993a commit f9fbd35
Show file tree
Hide file tree
Showing 8 changed files with 267 additions and 289 deletions.
130 changes: 34 additions & 96 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ on:
branches: ["main"]

jobs:
build-mac-os:
runs-on: macos-latest
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest] # windows-latest
steps:
- uses: actions/checkout@v3

Expand All @@ -18,55 +21,8 @@ jobs:
node-version: 14.x
cache: "yarn"

- uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install npm dependencies
run: |
npm install -g yarn
yarn install
- name: Install dependencies
run: brew install cmake openssl@3 cyrus-sasl

- run: yarn lint

- name: Cargo Cache
- name: Use node cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Artifacts cache
uses: actions/cache@v3
with:
path: src-tauri/target/release/bundle/dmg/
key: macOS-release #todo: hash of something that changes with versions

- name: Build artifact
run: yarn tauri build
env:
PKG_CONFIG_PATH: "/usr/local/opt/openssl@3/lib/pkgconfig"

build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: "yarn"

- uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -76,13 +32,14 @@ jobs:
npm install -g yarn
yarn install
- run: yarn lint

- name: Install dependencies
- name: Install Ubuntu dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update -y
sudo apt install libwebkit2gtk-4.0-dev libdbus-1-dev pkg-config libgtk-3-dev libsoup2.4-dev \
build-essential curl wget libsasl2-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
build-essential curl wget libsasl2-dev libayatana-appindicator3-dev librsvg2-dev
- run: yarn lint

- name: Cargo Cache
uses: actions/cache@v3
Expand All @@ -98,17 +55,21 @@ jobs:
- name: Artifacts cache
uses: actions/cache@v3
with:
path: |
src-tauri/target/release/bundle/deb/
src-tauri/target/release/bundle/appimage/
key: Linux-release #todo: hash of something that changes with versions
path: src-tauri/target/release/bundle/*
key: ${{ matrix.os }}-artifacts #todo: hash of something that changes with versions

- name: Build artifact
run: yarn tauri build

- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-artifacts
path: src-tauri/target/release/bundle/*
retention-days: 5

release:
runs-on: ubuntu-latest
needs: [build-ubuntu, build-mac-os]
needs: build
steps:
- uses: actions/checkout@v3

Expand All @@ -118,7 +79,8 @@ jobs:
node-version: 14.x
cache: "yarn"

- uses: actions/cache@v3
- name: Use node cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -128,50 +90,26 @@ jobs:
npm install -g yarn
yarn install
- name: Ubuntu artifacts cache
- name: Use ubuntu artifacts cache
uses: actions/cache@v3
with:
path: |
src-tauri/target/release/bundle/deb/
src-tauri/target/release/bundle/appimage/
key: Linux-release #todo: hash of something that changes with versions
path: src-tauri/target/release/bundle/*
key: ubuntu-latest-artifacts #todo: hash of something that changes with versions

- name: MacOs artifacts cache
- name: Use mac os artifacts cache
uses: actions/cache@v3
with:
path: src-tauri/target/release/bundle/dmg/
key: macOS-release #todo: hash of something that changes with versions
path: src-tauri/target/release/bundle/*
key: macos-latest-artifacts #todo: hash of something that changes with versions

# - name: Use win artifacts cache
# uses: actions/cache@v3
# with:
# path: src-tauri/target/release/bundle/*
# key: windows-latest-artifacts #todo: hash of something that changes with versions

- name: Semantic release
if: github.ref == 'refs/heads/main'
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# WIP: Windows
# build-windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v3
# - name: Use Node.js 14.x
# uses: actions/setup-node@v3
# with:
# node-version: 14.x
# cache: "yarn"
# - run: npm install -g yarn

# - name: Install dependencies
# run: |
# yarn install
# vcpkg install openssl:x64-windows-static-md

# - name: Cargo Cache
# uses: actions/cache@v1
# with:
# path: ~/.cargo
# key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
# restore-keys: |
# ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
# ${{ runner.os }}-cargo

# - name: Build
# run: yarn tauri build
Loading

0 comments on commit f9fbd35

Please sign in to comment.