Skip to content

Commit edb4d32

Browse files
authored
Merge branch 'main' into feat/cacerts-env-var
2 parents 8719e43 + ffd4f34 commit edb4d32

File tree

364 files changed

+12122
-2874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

364 files changed

+12122
-2874
lines changed

.github/workflows/ci.yaml

+34-2
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,39 @@ jobs:
4040
include:
4141
- os: ubuntu-latest
4242
target: x86_64-unknown-linux-gnu
43+
binary: x86-64
4344
use-cross: false
4445
run-integration-tests: true
4546
- os: ubuntu-latest
4647
target: x86_64-unknown-linux-musl
48+
binary: x86-64
4749
use-cross: true
4850
run-integration-tests: true
4951
- os: ubuntu-latest
5052
target: aarch64-unknown-linux-gnu
53+
binary: aarch64
5154
use-cross: true
5255
run-integration-tests: false # Cannot run aarch64 binaries on x86_64
5356
- os: ubuntu-latest
5457
target: aarch64-unknown-linux-musl
58+
binary: aarch64
5559
use-cross: true
5660
run-integration-tests: false # Cannot run aarch64 binaries on x86_64
5761
# macos>=14 runs exclusively on aarch64 and will thus fail to execute properly for x64
5862
- os: macos-13 # intel
5963
target: x86_64-apple-darwin
64+
binary: x86_64
6065
use-cross: false
6166
run-integration-tests: true
6267
- os: macos-latest # aarch64
6368
toolchain: stable
6469
target: aarch64-apple-darwin
70+
binary: arm64
6571
use-cross: false
6672
run-integration-tests: true
6773
- os: windows-latest
6874
target: x86_64-pc-windows-msvc
75+
binary: x86-64
6976
use-cross: false
7077
run-integration-tests: true
7178
steps:
@@ -109,10 +116,27 @@ jobs:
109116
uses: clechasseur/rs-cargo@v2
110117
with:
111118
command: install
112-
args: "--path compiler-cli --target ${{ matrix.target }} --debug --locked"
119+
args: "--path compiler-cli --target ${{ matrix.target }} --debug --locked --force"
113120
use-cross: ${{ matrix.use-cross }}
114121
if: ${{ matrix.run-integration-tests }}
115122

123+
- name: Verify binary architecture
124+
shell: bash
125+
run: |
126+
BINARY_PATH="${CARGO_HOME}/bin/gleam"
127+
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
128+
BINARY_PATH="${BINARY_PATH}.exe"
129+
fi
130+
131+
if ! file -b "$BINARY_PATH" | grep -q "${{ matrix.binary }}"; then
132+
echo "error: Architecture mismatch"
133+
echo "Expected architecture: '${{ matrix.binary }}'"
134+
echo "Found binary type: '$(file -b "$BINARY_PATH")'"
135+
exit 1
136+
fi
137+
echo "ok: Architecture match"
138+
if: ${{ matrix.run-integration-tests }}
139+
116140
- name: Run tests
117141
uses: clechasseur/rs-cargo@v2
118142
with:
@@ -262,7 +286,7 @@ jobs:
262286

263287
- uses: actions/setup-node@v4
264288
with:
265-
node-version: "18"
289+
node-version: "20"
266290

267291
- name: Install wasm-pack
268292
run: |
@@ -420,6 +444,14 @@ jobs:
420444
run: make test
421445
working-directory: ./test/running_modules
422446

447+
- name: test/multi_namespace
448+
run: ./test.sh
449+
working-directory: ./test/multi_namespace
450+
423451
- name: Test FFI in subdirectories
424452
run: make
425453
working-directory: ./test/subdir_ffi
454+
455+
- name: test/unicode_path
456+
run: make
457+
working-directory: ./test/unicode_path ⭐

.github/workflows/release-nightly.yaml

+26-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: release-nightly
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '45 0 * * *'
6+
- cron: "45 0 * * *"
77

88
env:
99
CARGO_TERM_COLOR: always
@@ -29,7 +29,7 @@ jobs:
2929

3030
build-nightly-clean:
3131
runs-on: ubuntu-latest
32-
needs: [ nightly-last-run ]
32+
needs: [nightly-last-run]
3333
if: ${{ github.repository_owner == 'gleam-lang' && needs.nightly-last-run.outputs.should_run != 'false' }}
3434
steps:
3535
- name: Delete old release assets
@@ -48,7 +48,7 @@ jobs:
4848
build-nightly:
4949
name: build-release
5050
runs-on: ${{ matrix.os }}
51-
needs: [ build-nightly-clean ]
51+
needs: [build-nightly-clean]
5252
if: ${{ github.repository_owner == 'gleam-lang' }}
5353
strategy:
5454
matrix:
@@ -62,19 +62,24 @@ jobs:
6262
include:
6363
- os: ubuntu-latest
6464
target: x86_64-unknown-linux-musl
65+
binary: x86-64
6566
use-cross: true
6667
- os: ubuntu-latest
6768
target: aarch64-unknown-linux-musl
69+
binary: aarch64
6870
use-cross: true
6971
# macos>=14 runs exclusively on aarch64 and will thus fail to execute properly for x64
7072
- os: macos-13
7173
target: x86_64-apple-darwin
74+
binary: x86_64
7275
use-cross: false
7376
- os: macos-latest
7477
target: aarch64-apple-darwin
78+
binary: arm64
7579
use-cross: false
7680
- os: windows-latest
7781
target: x86_64-pc-windows-msvc
82+
binary: x86-64
7883
use-cross: false
7984
steps:
8085
- name: Checkout repository
@@ -103,6 +108,22 @@ jobs:
103108
args: --release --target ${{ matrix.target }}
104109
use-cross: ${{ matrix.use-cross }}
105110

111+
- name: Verify binary architecture
112+
shell: bash
113+
run: |
114+
BINARY_PATH="target/${{ matrix.target }}/release/gleam"
115+
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
116+
BINARY_PATH="${BINARY_PATH}.exe"
117+
fi
118+
119+
if ! file -b "$BINARY_PATH" | grep -q "${{ matrix.binary }}"; then
120+
echo "error: Architecture mismatch"
121+
echo "Expected architecture: '${{ matrix.binary }}'"
122+
echo "Found binary type: '$(file -b "$BINARY_PATH")'"
123+
exit 1
124+
fi
125+
echo "ok: Architecture match"
126+
106127
- name: Build archive
107128
shell: bash
108129
run: |
@@ -171,7 +192,7 @@ jobs:
171192

172193
build-nightly-container-images:
173194
runs-on: ubuntu-latest
174-
needs: [ build-nightly ]
195+
needs: [build-nightly]
175196
if: ${{ github.repository_owner == 'gleam-lang' && needs.nightly-last-run.outputs.should_run != 'false' }}
176197
strategy:
177198
matrix:
@@ -220,7 +241,7 @@ jobs:
220241
file: containers/${{ matrix.base-image }}.dockerfile
221242
push: true
222243
tags: ${{ steps.versions.outputs.container_tag }}
223-
ghcr.io/${{ github.repository }}:nightly-${{ matrix.base-image }}
244+
ghcr.io/${{ github.repository }}:nightly-${{ matrix.base-image }}
224245
labels: |
225246
org.opencontainers.image.title=gleam
226247
org.opencontainers.image.url=https://gleam.run

.github/workflows/release.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,24 @@ jobs:
2424
include:
2525
- os: ubuntu-latest
2626
target: x86_64-unknown-linux-musl
27+
binary: x86-64
2728
use-cross: true
2829
- os: ubuntu-latest
2930
target: aarch64-unknown-linux-musl
31+
binary: aarch64
3032
use-cross: true
3133
# macos>=14 runs exclusively on aarch64 and will thus fail to execute properly for x64
3234
- os: macos-13
3335
target: x86_64-apple-darwin
36+
binary: x86_64
3437
use-cross: false
3538
- os: macos-latest
3639
target: aarch64-apple-darwin
40+
binary: arm64
3741
use-cross: false
3842
- os: windows-latest
3943
target: x86_64-pc-windows-msvc
44+
binary: x86-64
4045
use-cross: false
4146
steps:
4247
- name: Checkout repository
@@ -60,6 +65,22 @@ jobs:
6065
args: --release --target ${{ matrix.target }}
6166
use-cross: ${{ matrix.use-cross }}
6267

68+
- name: Verify binary architecture
69+
shell: bash
70+
run: |
71+
BINARY_PATH="target/${{ matrix.target }}/release/gleam"
72+
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
73+
BINARY_PATH="${BINARY_PATH}.exe"
74+
fi
75+
76+
if ! file -b "$BINARY_PATH" | grep -q "${{ matrix.binary }}"; then
77+
echo "error: Architecture mismatch"
78+
echo "Expected architecture: '${{ matrix.binary }}'"
79+
echo "Found binary type: '$(file -b "$BINARY_PATH")'"
80+
exit 1
81+
fi
82+
echo "ok: Architecture match"
83+
6384
- name: Build archive
6485
shell: bash
6586
run: |

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
erl_crash.dump
88
*.lock
99
node_modules/
10+
compiler-cli/build/

0 commit comments

Comments
 (0)