Skip to content
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

test #26

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

test #26

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d01ca55
test
kit-ty-kate Jun 5, 2024
75975fb
test
kit-ty-kate Jun 5, 2024
f979c8b
test
kit-ty-kate Jun 5, 2024
5d78a57
test
kit-ty-kate Jun 5, 2024
b3b1a4e
test
kit-ty-kate Jun 5, 2024
4499864
test
kit-ty-kate Jun 5, 2024
5fc4a9c
test
kit-ty-kate Jun 5, 2024
77ab6dc
test
kit-ty-kate Jun 5, 2024
7b55483
more debug
kit-ty-kate Jun 5, 2024
875b0eb
tmp
kit-ty-kate Jun 5, 2024
cc0c3d4
test
kit-ty-kate Jun 11, 2024
f6d9bff
test
kit-ty-kate Jun 11, 2024
7eac10b
test
kit-ty-kate Jun 11, 2024
01eee9b
test
kit-ty-kate Jun 11, 2024
66aed98
test
kit-ty-kate Jun 11, 2024
5a5fd8b
test
kit-ty-kate Jun 11, 2024
bd032be
test
kit-ty-kate Jun 11, 2024
fc64a48
debug
kit-ty-kate Jun 11, 2024
15aa657
tmp
kit-ty-kate Jun 11, 2024
1c07911
tmp
kit-ty-kate Jun 11, 2024
9e12959
test
kit-ty-kate Jun 11, 2024
04a0bbb
tmp
kit-ty-kate Jun 11, 2024
9aa1ec0
back
kit-ty-kate Jun 11, 2024
880b1ed
fix
kit-ty-kate Jun 11, 2024
f4a59d0
fixup
kit-ty-kate Jun 11, 2024
4217f88
test
kit-ty-kate Jun 11, 2024
d7838c7
new api
kit-ty-kate Jun 11, 2024
e216516
more options
kit-ty-kate Jun 11, 2024
5051c2a
windows path
kit-ty-kate Jun 11, 2024
9dc08ff
split
kit-ty-kate Jun 11, 2024
aa2c11e
env
kit-ty-kate Jun 12, 2024
77e0606
one more file
kit-ty-kate Jun 12, 2024
aa6e406
test all
kit-ty-kate Jun 12, 2024
50e1c98
multiline
kit-ty-kate Jun 12, 2024
b9590b4
properly error and skip uninstallable
kit-ty-kate Jun 12, 2024
17586e2
fix errorcode
kit-ty-kate Jun 12, 2024
e14a52f
fix error handling
kit-ty-kate Jun 12, 2024
a105789
add cache
kit-ty-kate Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Windows CI
on:
pull_request:
jobs:
build:
strategy:
matrix:
os:
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tree
uses: actions/checkout@v4

- name: Cache opam
id: cache-opam
uses: actions/cache@v4
with:
path: |
C:\Program Files\opam\bin
C:\Users\runneradmin\AppData\Local\opam
key: ${{ runner.os }}-opam

- name: Install opam
if: steps.cache-opam.outputs.cache-hit != 'true'
run: |
Invoke-Expression "& { $(Invoke-RestMethod https://raw.githubusercontent.com/kit-ty-kate/opam/windows-installer.debug/shell/install.ps1) } -OpamBinDir 'C:\Program Files\opam\bin' -NoSetPath -NoAdmin"
"C:\Program Files\opam\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

# - name: Install opam
# run: |
# curl -LO https://github.com/user-attachments/files/15792432/archive.zip
# unzip archive.zip
# New-Item -Force -Path "C:\Program Files\opam\bin" -Type Directory
# Move-Item -Force -Path "opam-tmp.exe" -Destination "C:\Program Files\opam\bin\opam.exe"
# "C:\Program Files\opam\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Init opam
if: steps.cache-opam.outputs.cache-hit != 'true'
run: opam init -yn .

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
#with:
# since_last_remote_commit: true

- name: List all changed packages
id: changed-packages
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
$output = @()
Foreach ($file in ($env:ALL_CHANGED_FILES).Split(" ")) {
switch -Regex ($file) {
'^packages\\[^\\]*\\([^\\]*)\\.*' { $output += "$($matches[1])"; Break }
default { Write-Host "$file skipped"; Break }
}
}
$outputJson = $output | ConvertTo-Json
"data<<@@@" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
$outputJson | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
"@@@" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append

- name: Install packages
env:
ALL_CHANGED_PACKAGES: ${{ steps.changed-packages.outputs.data }}
run: |
$pkgs = $env:ALL_CHANGED_PACKAGES | ConvertFrom-Json
$failed = $false
Foreach ($pkg in $pkgs) {
opam install --confirm-level=unsafe-yes "$pkg"
switch ($LASTEXITCODE) {
0 { Break }
20 { Write-Host "$pkg is not installable. Skip."; Break }
31 { Write-Host "$pkg failed to build."; $failed = $true; Break }
default { throw "Unexpected error $_" }
}
}
if ($failed) {
throw "build failed"
}
2 changes: 1 addition & 1 deletion packages/dune/dune.3.15.3/opam
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ conflicts: [
dev-repo: "git+https://github.com/ocaml/dune.git"
build: [
["ocaml" "boot/bootstrap.ml" "-j" jobs]
["./_boot/dune.exe" "build" "dune.install" "--release" "--profile" "dune-bootstrap" "-j" jobs]
["./_boot/dune.exe" "build" "dune.insta" "--release" "--profile" "dune-bootstrap" "-j" jobs]
]
depends: [
# Please keep the lower bound in sync with .github/workflows/workflow.yml,
Expand Down
2 changes: 1 addition & 1 deletion packages/ocamlbuild/ocamlbuild.0.14.3+win/opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage: "https://github.com/ocaml/ocamlbuild/"
doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc"
bug-reports: "https://github.com/ocaml/ocamlbuild/issues"
depends: [
"ocaml" {>= "4.03"}
"ocaml" {>= "4.0"}
]
conflicts: [
"base-ocamlbuild"
Expand Down
Loading