Skip to content

Commit 0d4425f

Browse files
committed
Update GitHub Actions workflows: add system dependencies installation, configure opam repositories, and remove Windows build steps.
1 parent 5b6ff52 commit 0d4425f

File tree

2 files changed

+12
-55
lines changed

2 files changed

+12
-55
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
with:
6464
ocaml-compiler: 5.3.0
6565
dune-cache: true
66+
opam-repositories: |
67+
default: https://github.com/ocaml/opam-repository.git
68+
opam-depext: false
6669
- name: Get version
6770
id: get_version
6871
run: |
@@ -71,6 +74,10 @@ jobs:
7174
else
7275
echo "VERSION=latest" >> $GITHUB_OUTPUT
7376
fi
77+
- name: Install system dependencies
78+
run: |
79+
sudo apt-get update
80+
sudo apt-get install -y --no-install-recommends build-essential
7481
- name: Install dependencies
7582
run: opam install . --deps-only --with-test
7683
- name: Build project
@@ -90,43 +97,4 @@ jobs:
9097
with:
9198
name: rescriptdep-linux-x64-${{ steps.get_version.outputs.VERSION }}
9299
path: dist/rescriptdep-linux-x64-${{ steps.get_version.outputs.VERSION }}.tar.gz
93-
retention-days: 7
94-
95-
build-windows:
96-
runs-on: windows-latest
97-
steps:
98-
- uses: actions/checkout@v4
99-
- name: Set up OCaml
100-
uses: ocaml/setup-ocaml@v2
101-
with:
102-
ocaml-compiler: 5.3.0
103-
dune-cache: true
104-
- name: Get version
105-
id: get_version
106-
shell: bash
107-
run: |
108-
if [[ $GITHUB_REF == refs/tags/cli-v* ]]; then
109-
echo "VERSION=${GITHUB_REF#refs/tags/cli-v}" >> $GITHUB_OUTPUT
110-
else
111-
echo "VERSION=latest" >> $GITHUB_OUTPUT
112-
fi
113-
- name: Install dependencies
114-
run: opam install . --deps-only --with-test
115-
- name: Build project
116-
run: opam exec -- dune build
117-
- name: Create executable directory
118-
run: mkdir -p dist
119-
- name: Copy executable
120-
shell: bash
121-
run: cp _build/default/bin/main.exe dist/rescriptdep.exe
122-
- name: Create zip archive
123-
shell: bash
124-
run: |
125-
cd dist
126-
7z a rescriptdep-win32-x64-${{ steps.get_version.outputs.VERSION }}.zip rescriptdep.exe
127-
- name: Upload artifact
128-
uses: actions/upload-artifact@v4
129-
with:
130-
name: rescriptdep-win32-x64-${{ steps.get_version.outputs.VERSION }}
131-
path: dist/rescriptdep-win32-x64-${{ steps.get_version.outputs.VERSION }}.zip
132100
retention-days: 7

.github/workflows/vscode-extension.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,22 @@ jobs:
4949

5050
- name: Create temp and bin directories
5151
run: |
52-
mkdir -p temp/darwin temp/linux temp/win32
52+
mkdir -p temp/darwin temp/linux
5353
mkdir -p vscode-rescriptdep/bin/darwin
5454
mkdir -p vscode-rescriptdep/bin/linux
55-
mkdir -p vscode-rescriptdep/bin/win32
5655
5756
- name: Download macOS CLI artifact
58-
uses: actions/download-artifact@v3
57+
uses: actions/download-artifact@v4
5958
with:
6059
name: rescriptdep-darwin-x64-latest
6160
path: temp/darwin
6261

6362
- name: Download Linux CLI artifact
64-
uses: actions/download-artifact@v3
63+
uses: actions/download-artifact@v4
6564
with:
6665
name: rescriptdep-linux-x64-latest
6766
path: temp/linux
6867

69-
- name: Download Windows CLI artifact
70-
uses: actions/download-artifact@v3
71-
with:
72-
name: rescriptdep-win32-x64-latest
73-
path: temp/win32
74-
7568
- name: Extract CLI binaries and move to extension bin folders
7669
run: |
7770
# Extract macOS binary
@@ -82,10 +75,6 @@ jobs:
8275
tar -xzf temp/linux/rescriptdep-linux-x64-latest.tar.gz -C temp/linux
8376
cp temp/linux/rescriptdep vscode-rescriptdep/bin/linux/
8477
85-
# Extract Windows binary
86-
unzip -j temp/win32/rescriptdep-win32-x64-latest.zip -d temp/win32
87-
cp temp/win32/rescriptdep.exe vscode-rescriptdep/bin/win32/
88-
8978
- name: Set executable permissions
9079
run: |
9180
chmod +x vscode-rescriptdep/bin/darwin/rescriptdep
@@ -113,7 +102,7 @@ jobs:
113102
vsce package
114103
115104
- name: Upload VSIX as Artifact
116-
uses: actions/upload-artifact@v3
105+
uses: actions/upload-artifact@v4
117106
with:
118107
name: vscode-rescriptdep-${{ steps.get_version.outputs.VERSION }}
119108
path: vscode-rescriptdep/vscode-rescriptdep-${{ steps.get_version.outputs.VERSION }}.vsix
@@ -138,7 +127,7 @@ jobs:
138127
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
139128
140129
- name: Download VSIX Artifact
141-
uses: actions/download-artifact@v3
130+
uses: actions/download-artifact@v4
142131
with:
143132
name: vscode-rescriptdep-${{ steps.get_version.outputs.VERSION }}
144133
path: ./

0 commit comments

Comments
 (0)