-
Notifications
You must be signed in to change notification settings - Fork 271
Added minimal CI + Signing section #503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iTrooz
wants to merge
11
commits into
maharmstone:master
Choose a base branch
from
iTrooz:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+215
−1
Open
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
321ca2b
added .gitignore
iTrooz b5e2683
added notice about Ninja generator
iTrooz 3f945bb
Added 'Signing' section
iTrooz fa90118
Added CI
iTrooz 1146f62
added instructions for disabling signature enforcement
iTrooz 4d20847
Added CI build status in the README
iTrooz e179119
Refactored arch names
iTrooz ba03aab
TEST : Sign driver in CI
iTrooz 6aa2376
Linting corrections from Saibamen
iTrooz d534ee9
use github native badge
iTrooz d96a877
Merge branch 'master' into master
iTrooz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,124 @@ | ||
| name: Build CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["*"] | ||
| pull_request: | ||
| branches: ["*"] | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| BUILD_CONFIG: RelWithDebInfo | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - shell_arch: x64 | ||
| win_arch: x64 | ||
| - shell_arch: x86 | ||
| win_arch: x86 | ||
| - shell_arch: amd64_arm64 | ||
| win_arch: arm64 | ||
| - shell_arch: amd64_arm | ||
| win_arch: arm | ||
|
|
||
| name: Build for ${{ matrix.win_arch }} | ||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| - name: Get Sources | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup shell | ||
| uses: ilammy/msvc-dev-cmd@v1 | ||
| with: | ||
| arch: ${{ matrix.shell_arch }} | ||
|
|
||
| - name: Prepare build | ||
| run: cmake -B build -G "Ninja" | ||
|
|
||
| - name: Build | ||
| run: cmake --build build --config ${{env.BUILD_CONFIG}} -j 3 | ||
|
|
||
| - name: Prepare files for upload | ||
| run: | | ||
| mkdir upload | ||
| mkdir upload/${{ matrix.win_arch }} | ||
| copy src/btrfs.inf upload | ||
| copy build/ubtrfs.dll upload/${{ matrix.win_arch }} | ||
| copy build/shellbtrfs.dll upload/${{ matrix.win_arch }} | ||
| copy build/mkbtrfs.exe upload/${{ matrix.win_arch }} | ||
| copy build/btrfs.sys upload/${{ matrix.win_arch }} | ||
iTrooz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| mkdir upload-pdb | ||
| mkdir upload-pdb/${{ matrix.win_arch }} | ||
| copy build/ubtrfs.pdb upload-pdb/${{ matrix.win_arch }} | ||
| copy build/shellbtrfs.pdb upload-pdb/${{ matrix.win_arch }} | ||
| copy build/mkbtrfs.pdb upload-pdb/${{ matrix.win_arch }} | ||
| copy build/btrfs.pdb upload-pdb/${{ matrix.win_arch }} | ||
| - name: Upload driver files | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: btrfs | ||
| path: upload/* | ||
|
|
||
| - name: Upload PDB files | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: btrfs-pdb | ||
| path: upload-pdb/* | ||
|
|
||
| sign: | ||
| needs: build | ||
| runs-on: windows-latest | ||
| name: Sign | ||
|
|
||
| env: | ||
| INF2CAT_PROGRAM: 'C:/Program Files (x86)/Windows Kits/10/bin/x86/Inf2Cat.exe' | ||
|
|
||
| steps: | ||
| - name: Get Sources | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup shell | ||
| uses: ilammy/msvc-dev-cmd@v1 | ||
| with: | ||
| arch: x86 | ||
|
|
||
| - uses: actions/download-artifact@v3 | ||
| with: | ||
| name: btrfs | ||
| path: upload | ||
|
|
||
| - name: Import key | ||
| run: | | ||
| # Create the PFX file from the base64-encoded secret | ||
| "${{ secrets.PFX_FILE_B64 }}" | Out-File -FilePath pfx.b64 | ||
| CertUtil -decode pfx.b64 cert.pfx | ||
| # Import it | ||
| $plaintextpwd = "password" | ||
| $pwd = ConvertTo-SecureString -String $plaintextpwd -Force -AsPlainText | ||
| Import-PfxCertificate -FilePath ./cert.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $pwd | ||
| - name: Create catalog file | ||
| run: | | ||
| cd upload | ||
| & "${{env.INF2CAT_PROGRAM}}" /os:10_NI_X64 /driver:. | ||
| - name: Sign catalog file | ||
| run: | | ||
| cd upload | ||
| SignTool sign /fd SHA256 /v /s My /n "Btrfs driver" /t http://timestamp.digicert.com btrfs.cat | ||
| - name: Upload driver | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: btrfs | ||
| path: upload/* | ||
This file contains hidden or 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,4 @@ | ||
| out | ||
| .vs | ||
| build | ||
| build-* |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.