1- name : Build release
1+ name : Build precompiled NIFs
22
33env :
4- MIN_SUPPORTED_RUST_VERSION : " 1.55.0 "
4+ NIF_DIRECTORY : " native/html5ever_nif "
55
66on :
77 push :
8+ branches :
9+ - main
10+ - master
811 tags :
912 - ' *'
1013
1114defaults :
1215 run :
1316 # Sets the working dir for "run" scripts.
1417 # Note that this won't change the directory for actions (tasks with "uses").
15- working-directory : ./native/html5ever_nif
18+ working-directory : " ./native/html5ever_nif"
1619
1720jobs :
1821 build_release :
@@ -25,26 +28,26 @@ jobs:
2528 # NIF version 2.16
2629 - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04 , nif: "2.16", use-cross: true }
2730 - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04 , nif: "2.16", use-cross: true }
28- - { target: aarch64-apple-darwin , os: macos-10.15 , nif: "2.16" }
29- - { target: x86_64-apple-darwin , os: macos-10.15 , nif: "2.16" }
31+ - { target: aarch64-apple-darwin , os: macos-11 , nif: "2.16" }
32+ - { target: x86_64-apple-darwin , os: macos-11 , nif: "2.16" }
3033 - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 , nif: "2.16" }
3134 - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04 , nif: "2.16", use-cross: true }
3235 - { target: x86_64-pc-windows-gnu , os: windows-2019 , nif: "2.16" }
3336 - { target: x86_64-pc-windows-msvc , os: windows-2019 , nif: "2.16" }
3437 # NIF version 2.15
3538 - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04 , nif: "2.15", use-cross: true }
3639 - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04 , nif: "2.15", use-cross: true }
37- - { target: aarch64-apple-darwin , os: macos-10.15 , nif: "2.15" }
38- - { target: x86_64-apple-darwin , os: macos-10.15 , nif: "2.15" }
40+ - { target: aarch64-apple-darwin , os: macos-11 , nif: "2.15" }
41+ - { target: x86_64-apple-darwin , os: macos-11 , nif: "2.15" }
3942 - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 , nif: "2.15" }
4043 - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04 , nif: "2.15", use-cross: true }
4144 - { target: x86_64-pc-windows-gnu , os: windows-2019 , nif: "2.15" }
4245 - { target: x86_64-pc-windows-msvc , os: windows-2019 , nif: "2.15" }
4346 # NIF version 2.14
4447 - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04 , nif: "2.14", use-cross: true }
4548 - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04 , nif: "2.14", use-cross: true }
46- - { target: aarch64-apple-darwin , os: macos-10.15 , nif: "2.14" }
47- - { target: x86_64-apple-darwin , os: macos-10.15 , nif: "2.14" }
49+ - { target: aarch64-apple-darwin , os: macos-11 , nif: "2.14" }
50+ - { target: x86_64-apple-darwin , os: macos-11 , nif: "2.14" }
4851 - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 , nif: "2.14" }
4952 - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04 , nif: "2.14", use-cross: true }
5053 - { target: x86_64-pc-windows-gnu , os: windows-2019 , nif: "2.14" }
8891 rustup default
8992 cargo -V
9093 rustc -V
94+ rustc --print=cfg
9195
9296 - name : Download cross from GitHub releases
9397 uses :
giantswarm/[email protected] @@ -144,7 +148,6 @@ jobs:
144148 *-apple-darwin) LIB_FINAL_SUFFIX=".so" ;;
145149 esac;
146150
147- # Check Html5ever.Precompiled.target/0 - lib/html5ever/precompiled.ex
148151 LIB_FINAL_NAME="${LIB_PREFIX}${PROJECT_NAME}-v${PROJECT_VERSION}-nif-${RUSTLER_NIF_VERSION}-${{ matrix.job.target }}${LIB_FINAL_SUFFIX}"
149152
150153 # Copy lib to final name on this directory
@@ -153,7 +156,7 @@ jobs:
153156 tar -cvzf "${LIB_FINAL_NAME}.tar.gz" "${LIB_FINAL_NAME}"
154157
155158 # Passes the path relative to the root of the project.
156- LIB_FINAL_PATH="native/html5ever_nif /${LIB_FINAL_NAME}.tar.gz"
159+ LIB_FINAL_PATH="${NIF_DIRECTORY} /${LIB_FINAL_NAME}.tar.gz"
157160
158161 # Let subsequent steps know where to find the lib
159162 echo ::set-output name=LIB_FINAL_PATH::${LIB_FINAL_PATH}
@@ -170,3 +173,4 @@ jobs:
170173 with :
171174 files : |
172175 ${{ steps.rename.outputs.LIB_FINAL_PATH }}
176+ if : startsWith(github.ref, 'refs/tags/')
0 commit comments