Skip to content

Commit

Permalink
ci bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LLukas22 committed Jul 22, 2023
1 parent 47f9dfc commit 7c1f25a
Showing 1 changed file with 32 additions and 68 deletions.
100 changes: 32 additions & 68 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ permissions:

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_PROVIDER_SHORT_NAME: ${{ secrets.APPLE_PROVIDER_SHORT_NAME }}

jobs:
linux:
Expand Down Expand Up @@ -97,27 +109,7 @@ jobs:
- name: Build the app
id: tauri_action
uses: tauri-apps/tauri-action@dev

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_PROVIDER_SHORT_NAME: ${{ secrets.APPLE_PROVIDER_SHORT_NAME }}

with:
prerelease: false
releaseDraft: ${{ !startsWith(github.ref, 'refs/tags/') }}
releaseName: "v__VERSION__"
releaseBody: ${{ steps.release_infos.outputs.release_body }}
releaseId: ${{ steps.release_infos.outputs.release_id }}
tagName: ${{ steps.release_infos.outputs.tag_name }}
args: "--features ${{ matrix.accelerator }}"

- name: List Artifacts
Expand All @@ -131,8 +123,7 @@ jobs:
name: "linux-${{ matrix.accelerator }}"
if-no-files-found: error
path: |
./src-tauri/target/release/bundle/**/*.dep
./src-tauri/target/release/bundle/**/*.AppImage*
${{steps.tauri_action.outputs.artifactPaths}}
windows:
strategy:
Expand Down Expand Up @@ -193,10 +184,10 @@ jobs:
- name: Set Windows Environment Variables
if: matrix.accelerator == 'clblast'
run: |
echo "CLBLAST_PATH=${{ github.workspace }}/vcpkg/packages/clblast_x64-windows" >> $GITHUB_ENV
echo "OPENCL_PATH=${{ github.workspace }}/vcpkg/packages/opencl_x64-windows" >> $GITHUB_ENV
echo "${{ github.workspace }}/vcpkg/packages/clblast_x64-windows/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}/vcpkg/packages/opencl_x64-windows/bin" >> $GITHUB_PATH
echo "CLBLAST_PATH=${{ github.workspace }}\vcpkg\packages\clblast_x64-windows" >> $GITHUB_ENV
echo "OPENCL_PATH=${{ github.workspace }}\vcpkg\packages\opencl_x64-windows" >> $GITHUB_ENV
echo "${{ github.workspace }}\vcpkg\packages\clblast_x64-windows\bin" >> $GITHUB_PATH
echo "${{ github.workspace }}\vcpkg\packages\opencl_x64-windows\bin" >> $GITHUB_PATH
shell: bash

- uses: Jimver/cuda-toolkit@v0.2.11
Expand All @@ -211,7 +202,19 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: import windows certificate
env:
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
Remove-Item -path certificate -include tempCert.txt
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
- name: run pnpm
run: |
pnpm i
Expand All @@ -233,27 +236,7 @@ jobs:
- name: Build the app
id: tauri_action
uses: tauri-apps/tauri-action@dev

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_PROVIDER_SHORT_NAME: ${{ secrets.APPLE_PROVIDER_SHORT_NAME }}

with:
prerelease: false
releaseDraft: ${{ !startsWith(github.ref, 'refs/tags/') }}
releaseName: "v__VERSION__"
releaseBody: ${{ steps.release_infos.outputs.release_body }}
releaseId: ${{ steps.release_infos.outputs.release_id }}
tagName: ${{ steps.release_infos.outputs.tag_name }}
args: "--features ${{ matrix.accelerator }}"

- name: List Artifacts
Expand All @@ -267,8 +250,7 @@ jobs:
name: "windows-${{ matrix.accelerator }}"
if-no-files-found: error
path: |
./src-tauri/target/release/bundle/**/*.exe
./src-tauri/target/release/bundle/**/*.msi
${{steps.tauri_action.outputs.artifactPaths}}
macos:
Expand Down Expand Up @@ -333,32 +315,14 @@ jobs:
uses: tauri-apps/tauri-action@dev

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_PROVIDER_SHORT_NAME: ${{ secrets.APPLE_PROVIDER_SHORT_NAME }}

# Needed to make the build run on Apple Silicon
CC: clang
CXX: clang++
MACOSX_DEPLOYMENT_TARGET: 10.9


with:
prerelease: false
releaseDraft: ${{ !startsWith(github.ref, 'refs/tags/') }}
releaseName: "v__VERSION__"
releaseBody: ${{ steps.release_infos.outputs.release_body }}
releaseId: ${{ steps.release_infos.outputs.release_id }}
tagName: ${{ steps.release_infos.outputs.tag_name }}
args: "--target ${{matrix.target}} --features metal"
args: "--target ${{matrix.target}}-apple-darwin --features metal"

- name: List Artifacts
shell: bash
Expand All @@ -371,4 +335,4 @@ jobs:
name: "macos"
if-no-files-found: error
path: |
./src-tauri/target/release/bundle/**/*.dmg
${{steps.tauri_action.outputs.artifactPaths}}

0 comments on commit 7c1f25a

Please sign in to comment.