-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
11,709 additions
and
1,024 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: build-windows | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
nix-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- uses: cachix/cachix-action@v14 | ||
with: | ||
name: nixos-devenv | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- run: | | ||
nix build .#windows -L | ||
cp result/bin/*.exe . | ||
nix build .#store-wsl.config.build.tarball -L | ||
cp result store.tar.gz | ||
nix build .#machine-wsl.config.build.tarball -L | ||
cp result machine.tar.gz | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: windows | ||
path: | | ||
*.exe | ||
*.tar.gz | ||
overwrite: true | ||
if-no-files-found: error | ||
windows: | ||
runs-on: windows-latest | ||
needs: | ||
- nix-build | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: 'aformatik/codchi-packaging' | ||
ref: '${{ github.ref_name }}' | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: windows | ||
path: msix | ||
- shell: bash | ||
run: | | ||
mkdir -p "msix/VFS/Common AppData/codchi/" | ||
mv msix/store.tar.gz msix/machine.tar.gz "msix/VFS/Common AppData/codchi/" | ||
- name: Parse Windows Version | ||
uses: frabert/replace-string-action@v2 | ||
id: winver | ||
with: | ||
string: '${{ github.ref_name }}' | ||
pattern: '^v(\d+).(\d+).(\d+)-?.*$' | ||
replace-with: '$1.$2.$3.0' | ||
- name: Insert version ${{ github.ref_name }} / ${{ steps.winver.outputs.replaced }} | ||
env: | ||
VERSION: ${{ github.ref_name }} | ||
WINVER: ${{ steps.winver.outputs.replaced }} | ||
shell: bash | ||
run: | | ||
for f in msix/{codchi.AppInstaller,AppxManifest.xml}; do | ||
sed -i \ | ||
"s/@VERSION@/$WINVER/g | ||
s/@VERSION_TAG@/$VERSION/g" \ | ||
$f | ||
done | ||
- run: | | ||
& "${env:ProgramFiles(x86)}\Windows Kits\10\App Certification Kit\makeappx.exe" pack /o /d .\msix\ /p codchi.msix | ||
- name: Azure Trusted Signing | ||
uses: azure/trusted-signing-action@v0.3.16 | ||
with: | ||
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }} | ||
endpoint: ${{ secrets.AZURE_ENDPOINT }} | ||
code-signing-account-name: ${{ secrets.AZURE_CODE_SIGNING_NAME }} | ||
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE_NAME }} | ||
files-folder: . | ||
files-folder-filter: msix | ||
file-digest: SHA256 | ||
- uses: softprops/action-gh-release@v2 | ||
with: | ||
prerelease: true | ||
fail_on_unmatched_files: true | ||
files: | | ||
codchi.msix | ||
msix/codchi.AppInstaller |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: test | ||
on: | ||
workflow_run: | ||
workflows: [build-windows] | ||
types: [completed] | ||
# pull_request: | ||
# branches: | ||
# - 'rust' | ||
# workflow_dispatch: {} | ||
|
||
# paths: | ||
# - 'cli/**' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
latest_version: ${{ steps.get-latest-version.outputs.latest_version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get latest versioned commit ${{ github.event.workflow_run.name }} | ||
id: get-latest-version | ||
run: | | ||
# Fetch all the tags | ||
git fetch --tags | ||
# Get the latest commit matching the pattern 'v*.*.*' | ||
echo "latest_version=$(git describe --tags --match "v*.*.*" $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT | ||
windows: | ||
needs: setup | ||
if: ${{ github.event.workflow_run.name == 'build-windows' || github.event_name == 'push' }} | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download assets from prerelease@${{ needs.setup.outputs.latest_version }} | ||
uses: robinraju/release-downloader@v1.9 | ||
with: | ||
tag: ${{ needs.setup.outputs.latest_version }} | ||
- name: Install codchi.msix | ||
run: | | ||
Install-Module Pester -Force | ||
Import-Module Pester -PassThru | ||
Import-Module appx -UseWindowsPowerShell 2>&1 | ||
Add-AppxPackage codchi.msix -AllowUnsigned 2>&1 | ||
wsl --update --web-download 2>&1 | ||
wsl --set-default-version 2 2>&1 | ||
Invoke-Pester ./tests/windows.ps1 2>&1 | ||
# - if: ${{ failure() }} | ||
# uses: mxschmitt/action-tmate@v3 | ||
# timeout-minutes: 10 | ||
linux: | ||
needs: setup | ||
if: ${{ github.event.workflow_run.name == 'build-linux' || github.event_name == 'push' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: canonical/setup-lxd@main | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- name: Download assets from prerelease@${{ needs.setup.outputs.latest_version }} | ||
uses: robinraju/release-downloader@v1.9 | ||
with: | ||
tag: ${{ needs.setup.outputs.latest_version }} | ||
- name: tests | ||
run: | | ||
cd codchi | ||
nix develop . -c cargo run -- -vvv | ||
# - if: ${{ failure() }} | ||
# uses: mxschmitt/action-tmate@v3 | ||
# timeout-minutes: 15 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.