-
-
Notifications
You must be signed in to change notification settings - Fork 40
ci: add windows exe build #33
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8a6969b
ci: add windows exe build
jef 06704f1
ci: build exe and update nightly
jef e0da370
ci: remove ifs
jef dc61a7d
ci: use 5.40
jef 3d47419
ci: cache for testing
jef f9a9866
ci: update deps and build
jef fb75c9f
ci: install sub::Util
jef f4a3ef0
ci: use cpanm
jef a08b49b
ci: old
jef b40cfaf
ci: entrypoint for windows, build on windows machine
jef 5905a3a
Update ci.yaml
jef 6c911cf
Update ci.yaml
jef 0d7aa4c
Merge branch 'main' into ci/windows-build
jef 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 |
|---|---|---|
| @@ -1,14 +1,52 @@ | ||
| name: Continuous Integration | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| build: | ||
| build-docker: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build service | ||
| run: docker build . | ||
|
|
||
| build-windows: | ||
| name: Build Windows executable | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Perl for Windows build | ||
| if: ${{ steps.release.outputs.release_created }} | ||
| uses: shogo82148/actions-setup-perl@v1 | ||
| with: | ||
| perl-version: "5.42" | ||
|
|
||
| - name: Install Perl dependencies for Windows build | ||
| if: ${{ steps.release.outputs.release_created }} | ||
|
jef marked this conversation as resolved.
Outdated
jef marked this conversation as resolved.
Outdated
|
||
| run: | | ||
| cpanm --notest PAR::Packer | ||
| cpanm --notest Compress::Zlib | ||
| cpanm --notest Encode | ||
| cpanm --notest File::Basename | ||
| cpanm --notest File::Copy | ||
| cpanm --notest Getopt::Std | ||
| cpanm --notest HTTP::Cookies | ||
| cpanm --notest URI | ||
| cpanm --notest URI::Escape | ||
| cpanm --notest LWP::UserAgent | ||
| cpanm --notest LWP::ConnCache | ||
| cpanm --notest POSIX | ||
| cpanm --notest Time::Local | ||
| cpanm --notest Time::Piece | ||
| cpanm --notest JSON | ||
|
|
||
| - name: Build Windows executable | ||
| run: pp -o zap2xml.exe zap2xml.pl | ||
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 |
|---|---|---|
| @@ -1,38 +1,40 @@ | ||
| name: Nightly Release | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| check-date: | ||
| name: Check dates | ||
| nightly-release: | ||
| name: Nightly Build and Release Docker image (if code changed in 24h) | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| should-run: ${{ steps.code-change.outputs.should-run }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
| - name: Check if code has changed with 24 hours | ||
| continue-on-error: true | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Check if code has changed within 24 hours | ||
| id: code-change | ||
| run: | | ||
| [[ $(git rev-list --after="24 hours" --first-parent HEAD) ]] && echo "::set-output name=should-run::true" | ||
| build-release: | ||
| name: Build and release Docker image | ||
| runs-on: ubuntu-latest | ||
| needs: check-date | ||
| if: needs.check-date.outputs.should-run == 'true' | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
| if [[ $(git rev-list --after="24 hours" --first-parent HEAD) ]]; then | ||
| echo "should-run=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "should-run=false" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Login into GitHub Container Registry | ||
| run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | ||
| if: steps.code-change.outputs.should-run == 'true' | ||
| run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | ||
|
|
||
| - name: Build Docker image | ||
| if: steps.code-change.outputs.should-run == 'true' | ||
| run: | | ||
| docker build \ | ||
| -t "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}" \ | ||
| -t "ghcr.io/${GITHUB_REPOSITORY}:nightly" . | ||
|
|
||
| - name: Release Docker image | ||
| if: steps.code-change.outputs.should-run == 'true' | ||
| run: | | ||
| docker push "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}" | ||
| docker push "ghcr.io/${GITHUB_REPOSITORY}:nightly" |
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
Oops, something went wrong.
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.