@@ -16,75 +16,72 @@ permissions:
1616 contents : write
1717
1818env :
19- CARGO_ARGS : --no-default-features --features stdlib,importlib,encodings,sqlite,ssl
2019 X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR : C:\Program Files\OpenSSL\lib\VC\x64\MD
2120 X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR : C:\Program Files\OpenSSL\include
2221
2322jobs :
2423 build :
25- runs-on : ${{ matrix.platform.runner }}
24+ runs-on : ${{ matrix.os }}
2625 # Disable this scheduled job when running on a fork.
2726 if : ${{ github.repository == 'RustPython/RustPython' || github.event_name != 'schedule' }}
2827 strategy :
2928 matrix :
30- platform :
31- - runner : ubuntu-latest
29+ include :
30+ - os : ubuntu-latest
3231 target : x86_64-unknown-linux-gnu
33- # - runner: ubuntu-latest
34- # target: i686-unknown-linux-gnu
35- # - runner: ubuntu-latest
36- # target: aarch64-unknown-linux-gnu
37- # - runner: ubuntu-latest
38- # target: armv7-unknown-linux-gnueabi
39- # - runner: ubuntu-latest
40- # target: s390x-unknown-linux-gnu
41- # - runner: ubuntu-latest
42- # target: powerpc64le-unknown-linux-gnu
43- - runner : macos-latest
32+ - os : macos-latest
4433 target : aarch64-apple-darwin
45- # - runner: macos-latest
46- # target: x86_64-apple-darwin
47- - runner : windows-2025
34+ - os : windows-2025
4835 target : x86_64-pc-windows-msvc
49- # - runner: windows-2025
50- # target: i686-pc-windows-msvc
51- # - runner: windows-2025
52- # target: aarch64-pc-windows-msvc
36+ # - os: ubuntu-latest
37+ # target: i686-unknown-linux-gnu
38+ # - os: ubuntu-latest
39+ # target: aarch64-unknown-linux-gnu
40+ # - os: ubuntu-latest
41+ # target: armv7-unknown-linux-gnueabi
42+ # - os: ubuntu-latest
43+ # target: s390x-unknown-linux-gnu
44+ # - os: ubuntu-latest
45+ # target: powerpc64le-unknown-linux-gnu
46+ # - os: macos-latest
47+ # target: x86_64-apple-darwin
48+ # - os: windows-2025
49+ # target: i686-pc-windows-msvc
50+ # - os: windows-2025
51+ # target: aarch64-pc-windows-msvc
5352 fail-fast : false
5453 steps :
5554 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5655 with :
5756 persist-credentials : false
5857
5958 - uses : dtolnay/rust-toolchain@stable
60- - uses : cargo-bins/cargo-binstall@main
59+ with :
60+ target : ${{ matrix.target }}
6161
62- - name : Set up Environment
63- shell : bash
64- run : rustup target add ${{ matrix.platform.target }}
65- - name : Set up MacOS Environment
66- run : brew install autoconf automake libtool
67- if : runner.os == 'macOS'
62+ - name : Install macOS dependencies
63+ uses : ./.github/actions/install-macos-deps
64+ with :
65+ autoconf : true
66+ automake : true
67+ libtool : true
6868
6969 - name : Build RustPython
70- run : cargo build --release --target=${{ matrix.platform.target }} --verbose --features=threading ${{ env.CARGO_ARGS }}
71- if : runner.os == 'macOS'
72- - name : Build RustPython
73- run : cargo build --release --target=${{ matrix.platform.target }} --verbose --features=threading ${{ env.CARGO_ARGS }},jit
74- if : runner.os != 'macOS'
70+ run : cargo build --release --target=${{ matrix.target }} --verbose --no-default-features --features stdlib,stdio,importlib,encodings,sqlite,host_env,ssl-rustls,threading,jit
7571
7672 - name : Rename Binary
77- run : cp target/${{ matrix.platform. target }}/release/rustpython target/rustpython-release-${{ runner.os }}-${{ matrix.platform .target }}
73+ run : cp target/${{ matrix.target }}/release/rustpython target/rustpython-release-${{ runner.os }}-${{ matrix.target }}
7874 if : runner.os != 'Windows'
75+
7976 - name : Rename Binary
80- run : cp target/${{ matrix.platform. target }}/release/rustpython.exe target/rustpython-release-${{ runner.os }}-${{ matrix.platform .target }}.exe
77+ run : cp target/${{ matrix.target }}/release/rustpython.exe target/rustpython-release-${{ runner.os }}-${{ matrix.target }}.exe
8178 if : runner.os == 'Windows'
8279
8380 - name : Upload Binary Artifacts
84- uses : actions/upload-artifact@v7.0.0
81+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
8582 with :
86- name : rustpython-release-${{ runner.os }}-${{ matrix.platform. target }}
87- path : target/rustpython-release-${{ runner.os }}-${{ matrix.platform. target }}*
83+ name : rustpython-release-${{ runner.os }}-${{ matrix.target }}
84+ path : target/rustpython-release-${{ runner.os }}-${{ matrix.target }}*
8885
8986 build-wasm :
9087 runs-on : ubuntu-latest
@@ -106,23 +103,29 @@ jobs:
106103 run : cp target/wasm32-wasip1/release/rustpython.wasm target/rustpython-release-wasm32-wasip1.wasm
107104
108105 - name : Upload Binary Artifacts
109- uses : actions/upload-artifact@v7.0.0
106+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
110107 with :
111108 name : rustpython-release-wasm32-wasip1
112109 path : target/rustpython-release-wasm32-wasip1.wasm
113110
114111 - name : install wasm-pack
115112 run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
116- - uses : actions/setup-node@v6
113+
114+ - uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
115+ with :
116+ package-manager-cache : false
117+
117118 - uses : mwilliamson/setup-wabt-action@v3
118119 with : { wabt-version: "1.0.30" }
120+
119121 - name : build demo
120122 run : |
121123 npm install
122124 npm run dist
123125 env :
124126 NODE_OPTIONS : " --openssl-legacy-provider"
125127 working-directory : ./wasm/demo
128+
126129 - name : build notebook demo
127130 run : |
128131 npm install
@@ -131,7 +134,9 @@ jobs:
131134 env :
132135 NODE_OPTIONS : " --openssl-legacy-provider"
133136 working-directory : ./wasm/notebook
137+
134138 - name : Deploy demo to Github Pages
139+ if : ${{ github.repository == 'RustPython/RustPython' }}
135140 uses : peaceiris/actions-gh-pages@v4
136141 with :
137142 deploy_key : ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
@@ -150,26 +155,21 @@ jobs:
150155 persist-credentials : false
151156
152157 - name : Download Binary Artifacts
153- uses : actions/download-artifact@v8.0.1
158+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
154159 with :
155160 path : bin
156161 pattern : rustpython-*
157162 merge-multiple : true
158163
159164 - name : Create Lib Archive
160- run : |
161- zip -r bin/rustpython-lib.zip Lib/
165+ run : zip -r bin/rustpython-lib.zip Lib/
162166
163167 - name : List Binaries
164168 run : |
165169 ls -lah bin/
166170 file bin/*
171+
167172 - name : Create Release
168- env :
169- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
170- tag : ${{ github.ref_name }}
171- run : ${{ github.run_number }}
172- PRE_RELEASE_INPUT : ${{ github.event.inputs.pre-release }}
173173 run : |
174174 if [[ "${PRE_RELEASE_INPUT}" == "false" ]]; then
175175 RELEASE_TYPE_NAME=Release
@@ -188,3 +188,8 @@ jobs:
188188 --generate-notes \
189189 $PRERELEASE_ARG \
190190 bin/rustpython-release-*
191+ env :
192+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
193+ tag : ${{ github.ref_name }}
194+ run : ${{ github.run_number }}
195+ PRE_RELEASE_INPUT : ${{ github.event.inputs.pre-release }}
0 commit comments