test: Add performance test for GetSecuritySettings with and without c… #15
Workflow file for this run
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: Build and Release all | |
on: | |
push: | |
branches: | |
- action-needs-refinement-lol | |
jobs: | |
build-backend-binary: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest # for Arm based macs (M1 and above). | |
goos: darwin | |
extension: "" | |
args: '--target aarch64-apple-darwin' | |
arch: arm64 | |
- os: macos-latest # for Intel based macs. | |
goos: darwin | |
extension: "" | |
args: '--target x86_64-apple-darwin' | |
arch: x86_64 | |
- os: windows-latest # for Windows. | |
goos: windows | |
extension: ".exe" | |
args: '' | |
arch: x86_64 | |
- os: ubuntu-latest # for Linux. | |
goos: linux | |
extension: "" | |
args: '' | |
arch: x86_64 | |
name: Build Backend Binary | |
runs-on: ${{ matrix.os }} | |
# set working directory | |
defaults: | |
run: | |
working-directory: occupi-backend | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' # Specify the Go version you are using | |
- name: Build application | |
run: | | |
go build -o occupi-backend_${{ matrix.goos }}_${{ matrix.arch }}${{ matrix.extension }} ${{ matrix.args }} -v cmd/occupi-backend/main.go | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: occupi-backend_${{ matrix.goos }}_${{ matrix.arch }}${{ matrix.extension }} | |
path: occupi-backend_${{ matrix.goos }}_${{ matrix.arch }}${{ matrix.extension }} | |
build-android: | |
runs-on: ubuntu-latest | |
# set working directory | |
defaults: | |
run: | |
working-directory: frontend/occupi-mobile4 | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: 18.x | |
cache: 'npm' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup Expo | |
uses: expo/expo-github-action@v8 | |
with: | |
expo-version: latest | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Install dependencies | |
run: npm install --legacy-peer-deps | |
- name: Build Android app | |
run: eas build --platform android --profile preview --local --output ${{ github.workspace }}/occupi-mobile-android.apk | |
- name: Upload APK artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: occupi-mobile-android.apk | |
path: occupi-mobile-android.apk | |
build-ios: | |
runs-on: macos-latest | |
# set working directory | |
defaults: | |
run: | |
working-directory: frontend/occupi-mobile4 | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: 18.x | |
cache: 'npm' | |
- name: Setup Expo | |
uses: expo/expo-github-action@v8 | |
with: | |
expo-version: latest | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Install dependencies | |
run: npm install --legacy-peer-deps | |
- name: Build iOS app | |
run: eas build --platform ios --local --non-interactive --output ${{ github.workspace }}/occupi-mobile-ios.ipa | |
- name: Upload IPA artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: occupi-mobile-ios | |
path: ${{ github.workspace }}/occupi-mobile-ios.ipa | |
build-vite-app: | |
name: Build Vite App | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest # or "latest", "canary", <sha> | |
- name: Install dependencies with Bun | |
run: | | |
cd frontend/occupi-web | |
bun install | |
- name: Build with Vite | |
run: | | |
cd frontend/occupi-web | |
bun run build | |
- name: Archive Vite App from dist folder | |
run: | | |
zip -r dist/occupi-web.zip frontend/occupi-web/dist | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: occupi-web | |
path: frontend/occupi-web/dist/occupi-web.zip | |
build-tauri-app: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest # for Arm based macs (M1 and above). | |
goos: darwin | |
extension: "" | |
args: '--target aarch64-apple-darwin' | |
arch: arm64 | |
- os: macos-latest # for Intel based macs. | |
goos: darwin | |
extension: "" | |
args: '--target x86_64-apple-darwin' | |
arch: x86_64 | |
- os: windows-latest # for Windows. | |
goos: windows | |
extension: ".exe" | |
args: '' | |
arch: x86_64 | |
- os: ubuntu-latest # for Linux. | |
goos: linux | |
extension: "" | |
args: '' | |
arch: x86_64 | |
# set working directory | |
defaults: | |
run: | |
working-directory: frontend/occupi-desktop | |
name: Build Tauri App | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest # or "latest", "canary", <sha> | |
- name: Install dependencies with Bun | |
run: | | |
cd frontend/occupi-desktop | |
bun install | |
- name: Build with Tauri | |
run: | | |
cd frontend/occupi-desktop | |
bun run tauri build | |
- name: Archive and Upload MacOS Tauri App | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
mkdir -p tauri_artifacts | |
cp -R src-tauri/target/release/bundle/dmg/* tauri_artifacts/ || true | |
cp -R src-tauri/target/release/bundle/macos/* tauri_artifacts/ || true | |
- name: Archive and Upload Windows Tauri App | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
mkdir -p tauri_artifacts | |
cp -R src-tauri/target/release/bundle/nsis/* tauri_artifacts/ || true | |
cp -R src-tauri/target/release/bundle/msi/* tauri_artifacts/ || true | |
- name: Archive and Upload Linux Tauri App | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
mkdir -p tauri_artifacts | |
cp -R src-tauri/target/release/bundle/deb/* tauri_artifacts/ || true | |
cp -R src-tauri/target/release/bundle/appimage/* tauri_artifacts/ || true | |
cp -R src-tauri/target/release/bundle/rpm/* tauri_artifacts/ || true | |
cp -R src-tauri/target/release/bundle/flatpak/* tauri_artifacts/ || true | |
- name: Upload Tauri Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tauri-artifacts-${{ matrix.os }} | |
path: frontend/occupi-desktop/tauri_artifacts | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [build-backend-binary, build-android, build-ios, build-vite-app, build-tauri-app] | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
# according to the docs, if name is not specified, all artifacts are downloaded | |
# https://github.com/actions/download-artifact/tree/v4/?tab=readme-ov-file#inputs | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Release all downloaded artifacts in dist folder | |
run: |